Package org.zkoss.zk.ui.util
Class ConditionImpl
java.lang.Object
org.zkoss.zk.ui.util.ConditionImpl
- All Implemented Interfaces:
Serializable
- Author:
- tomyeh
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetIf()Returns If expression.static ConditionImplgetInstance(String ifc, String unless) Returns an instance of Condition, or null if both ifc and unless are empty.Returns Unless expression.booleanisEffective(Evaluator eval, Component comp) Used to evaluate whether it is effective.booleanisEffective(Evaluator eval, Page page) Used to evaluate whether it is effective.booleanisIf()Returns whether it's If condition.booleanisUnless()Returns whether it's Unless condition.voidSets the if condition.voidSets the unless condition.
-
Constructor Details
-
ConditionImpl
Construct. In most cases, usegetInstance(java.lang.String, java.lang.String)instead of this constructor.
-
-
Method Details
-
getInstance
Returns an instance of Condition, or null if both ifc and unless are empty. In other words, it is useful if you use null or empty to denote true. -
setIf
Sets the if condition.- Parameters:
cond- the condition. Note: If null (not specified), it is considered effective.- See Also:
-
setUnless
Sets the unless condition.- Parameters:
cond- the condition. Note: If null (not specified), it is considered ineffective.- See Also:
-
isEffective
Used to evaluate whether it is effective.- Parameters:
eval- the evaluator to evaluate this conditioncomp- used as the self variable. Ignored if null.- Since:
- 3.0.0
-
isEffective
Used to evaluate whether it is effective.- Parameters:
eval- the evaluator to evaluate this conditionpage- used as the self variable. Ignored if null.- Since:
- 3.0.0
-
isIf
public boolean isIf()Returns whether it's If condition.- Since:
- 10.0.0
-
getIf
Returns If expression.- Since:
- 10.0.0
-
getUnless
Returns Unless expression.- Since:
- 10.0.0
-
isUnless
public boolean isUnless()Returns whether it's Unless condition.- Since:
- 10.0.0
-