Package org.mozilla.zest.core.v1
Class ZestExpressionEquals
- java.lang.Object
-
- org.mozilla.zest.core.v1.ZestElement
-
- org.mozilla.zest.core.v1.ZestExpression
-
- org.mozilla.zest.core.v1.ZestExpressionEquals
-
- All Implemented Interfaces:
ZestExpressionElement
public class ZestExpressionEquals extends ZestExpression
The Class ZestExpressionRegex.
-
-
Field Summary
-
Fields inherited from class org.mozilla.zest.core.v1.ZestElement
JSON_ELEMENT_TYPE
-
-
Constructor Summary
Constructors Constructor Description ZestExpressionEquals()Instantiates a new zest expression regex.ZestExpressionEquals(String variableName, String regex)Instantiates a new zest expression regex.ZestExpressionEquals(String variableName, String value, boolean caseExact, boolean inverse)Instantiates a new zest expression regex.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ZestExpressionEqualsdeepCopy()Deep copy.StringgetValue()Gets the value.StringgetVariableName()Gets the variable name.booleanisCaseExact()Checks if is case exact.booleanisLeaf()true if it is a Simple Conditional false otherwise.booleanisTrue(ZestRuntime runtime)the boolean value result of the expression without inverse flag.voidsetCaseExact(boolean caseExact)Sets the case exact.voidsetValue(String value)Sets the value.voidsetVariableName(String variableName)Sets the variable name.-
Methods inherited from class org.mozilla.zest.core.v1.ZestExpression
evaluate, isInverse, setInverse
-
Methods inherited from class org.mozilla.zest.core.v1.ZestElement
getElementType, isSameSubclass, setElementType
-
-
-
-
Constructor Detail
-
ZestExpressionEquals
public ZestExpressionEquals()
Instantiates a new zest expression regex.
-
ZestExpressionEquals
public ZestExpressionEquals(String variableName, String regex)
Instantiates a new zest expression regex.- Parameters:
variableName- the variableNameregex- the regex
-
-
Method Detail
-
isTrue
public boolean isTrue(ZestRuntime runtime)
Description copied from interface:ZestExpressionElementthe boolean value result of the expression without inverse flag.- Parameters:
runtime- the runtime- Returns:
- the boolean value of the expression without inverse flag
-
getVariableName
public String getVariableName()
Gets the variable name.- Returns:
- the variable name
-
setVariableName
public void setVariableName(String variableName)
Sets the variable name.- Parameters:
variableName- the new variable name
-
getValue
public String getValue()
Gets the value.- Returns:
- the value
-
setValue
public void setValue(String value)
Sets the value.- Parameters:
value- the new value
-
isCaseExact
public boolean isCaseExact()
Checks if is case exact.- Returns:
- true, if is case exact
-
setCaseExact
public void setCaseExact(boolean caseExact)
Sets the case exact.- Parameters:
caseExact- the new case exact
-
isLeaf
public boolean isLeaf()
Description copied from interface:ZestExpressionElementtrue if it is a Simple Conditional false otherwise.- Specified by:
isLeafin interfaceZestExpressionElement- Overrides:
isLeafin classZestExpression- Returns:
- true if it is a Simple Conditional false otherwise
-
deepCopy
public ZestExpressionEquals deepCopy()
Description copied from class:ZestElementDeep copy.- Specified by:
deepCopyin interfaceZestExpressionElement- Specified by:
deepCopyin classZestExpression- Returns:
- the zest element
- See Also:
ZestElement
-
-