Package org.mozilla.zest.core.v1
Class ZestExpressionIsInteger
- java.lang.Object
-
- org.mozilla.zest.core.v1.ZestElement
-
- org.mozilla.zest.core.v1.ZestExpression
-
- org.mozilla.zest.core.v1.ZestExpressionIsInteger
-
- All Implemented Interfaces:
ZestExpressionElement
public class ZestExpressionIsInteger extends ZestExpression
Represent an expression that tests to see if a variable value is an integer.
-
-
Field Summary
-
Fields inherited from class org.mozilla.zest.core.v1.ZestElement
JSON_ELEMENT_TYPE
-
-
Constructor Summary
Constructors Constructor Description ZestExpressionIsInteger()Instantiates a new zest expression regex.ZestExpressionIsInteger(String variableName)Instantiates a new zest expression isInteger.ZestExpressionIsInteger(String variableName, boolean inverse)Construct aZestExpressionIsIntegerwith the given variable name and inverse state.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ZestExpressionIsIntegerdeepCopy()Deep copy.StringgetVariableName()Gets the variable name.booleanisLeaf()true if it is a Simple Conditional false otherwise.booleanisTrue(ZestRuntime runtime)the boolean value result of the expression without inverse flag.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
-
ZestExpressionIsInteger
public ZestExpressionIsInteger()
Instantiates a new zest expression regex.
-
ZestExpressionIsInteger
public ZestExpressionIsInteger(String variableName)
Instantiates a new zest expression isInteger.- Parameters:
variableName- the variableName
-
ZestExpressionIsInteger
public ZestExpressionIsInteger(String variableName, boolean inverse)
Construct aZestExpressionIsIntegerwith the given variable name and inverse state.- Parameters:
variableName- the name of the variable to check.inverse- if the expression should be the inverse.- Since:
- 0.14.0
-
-
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
-
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 ZestExpressionIsInteger deepCopy()
Description copied from class:ZestElementDeep copy.- Specified by:
deepCopyin interfaceZestExpressionElement- Specified by:
deepCopyin classZestExpression- Returns:
- the zest element
- See Also:
ZestElement
-
-