Package org.mozilla.zest.core.v1
Class ZestExpressionLength
- java.lang.Object
-
- org.mozilla.zest.core.v1.ZestElement
-
- org.mozilla.zest.core.v1.ZestExpression
-
- org.mozilla.zest.core.v1.ZestExpressionLength
-
- All Implemented Interfaces:
ZestExpressionElement
public class ZestExpressionLength extends ZestExpression
The Class ZestExpressionLength.
-
-
Field Summary
-
Fields inherited from class org.mozilla.zest.core.v1.ZestElement
JSON_ELEMENT_TYPE
-
-
Constructor Summary
Constructors Constructor Description ZestExpressionLength()Instantiates a new zest expression length.ZestExpressionLength(String variableName, int length, int approx)Instantiates a new zest expression length.ZestExpressionLength(String variableName, int length, int approx, boolean inverse)Instantiates a new zest expression length.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ZestExpressionLengthdeepCopy()Deep copy.intgetApprox()Gets the approx.intgetLength()Gets the length.StringgetVariableName()Gets the variable name.booleanisTrue(ZestRuntime runtime)the boolean value result of the expression without inverse flag.voidsetApprox(int approx)Sets the approx.voidsetLength(int length)Sets the length.voidsetVariableName(String variableName)Sets the variable name.StringtoString()-
Methods inherited from class org.mozilla.zest.core.v1.ZestExpression
evaluate, isInverse, isLeaf, setInverse
-
Methods inherited from class org.mozilla.zest.core.v1.ZestElement
getElementType, isSameSubclass, setElementType
-
-
-
-
Constructor Detail
-
ZestExpressionLength
public ZestExpressionLength()
Instantiates a new zest expression length.
-
ZestExpressionLength
public ZestExpressionLength(String variableName, int length, int approx)
Instantiates a new zest expression length.- Parameters:
variableName- the variable namelength- the lengthapprox- the approx
-
ZestExpressionLength
public ZestExpressionLength(String variableName, int length, int approx, boolean inverse)
Instantiates a new zest expression length.- Parameters:
variableName- the variable namelength- the lengthapprox- the approximationinverse- is inverse?
-
-
Method Detail
-
deepCopy
public ZestExpressionLength deepCopy()
Description copied from class:ZestElementDeep copy.- Specified by:
deepCopyin interfaceZestExpressionElement- Specified by:
deepCopyin classZestExpression- Returns:
- the zest element
- See Also:
ZestElement
-
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
-
getLength
public int getLength()
Gets the length.- Returns:
- the length
-
setLength
public void setLength(int length)
Sets the length.- Parameters:
length- the new length
-
getApprox
public int getApprox()
Gets the approx.- Returns:
- the approx
-
setApprox
public void setApprox(int approx)
Sets the approx.- Parameters:
approx- the new approx
-
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
-
-