Package org.mozilla.zest.core.v1
Class ZestExpressionRegex
- java.lang.Object
-
- org.mozilla.zest.core.v1.ZestElement
-
- org.mozilla.zest.core.v1.ZestExpression
-
- org.mozilla.zest.core.v1.ZestExpressionRegex
-
- All Implemented Interfaces:
ZestExpressionElement
public class ZestExpressionRegex 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 ZestExpressionRegex()Instantiates a new zest expression regex.ZestExpressionRegex(String variableName, String regex)Instantiates a new zest expression regex.ZestExpressionRegex(String variableName, String regex, boolean caseExact, boolean inverse)Instantiates a new zest expression regex.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ZestExpressionRegexdeepCopy()Deep copy.StringgetRegex()Gets the regex.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.voidsetRegex(String regex)Sets the regex.voidsetVariableName(String variableName)Sets the variable name.StringtoString()-
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
-
-
-
-
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
-
getRegex
public String getRegex()
Gets the regex.- Returns:
- the regex
-
setRegex
public void setRegex(String regex)
Sets the regex.- Parameters:
regex- the new regex
-
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 ZestExpressionRegex deepCopy()
Description copied from class:ZestElementDeep copy.- Specified by:
deepCopyin interfaceZestExpressionElement- Specified by:
deepCopyin classZestExpression- Returns:
- the zest element
- See Also:
ZestElement
-
-