Package org.mozilla.zest.core.v1
Class ZestExpression
- java.lang.Object
-
- org.mozilla.zest.core.v1.ZestElement
-
- org.mozilla.zest.core.v1.ZestExpression
-
- All Implemented Interfaces:
ZestExpressionElement
- Direct Known Subclasses:
ZestExpressionClientElementExists,ZestExpressionEquals,ZestExpressionIsInteger,ZestExpressionLength,ZestExpressionProtocol,ZestExpressionRegex,ZestExpressionResponseTime,ZestExpressionStatusCode,ZestExpressionURL,ZestStructuredExpression
public abstract class ZestExpression extends ZestElement implements ZestExpressionElement
The Class ZestExpression.
-
-
Field Summary
-
Fields inherited from class org.mozilla.zest.core.v1.ZestElement
JSON_ELEMENT_TYPE
-
-
Constructor Summary
Constructors Modifier Constructor Description ZestExpression()Instantiates a new zest expression.protectedZestExpression(boolean inverse)Constructs aZestExpressionwith the given inverse state.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract ZestExpressiondeepCopy()Deep copy.booleanevaluate(ZestRuntime runtime)the boolean value of the whole Conditional Element.booleanisInverse()return true if the Conditional Element has a NOT clause.booleanisLeaf()true if it is a Simple Conditional false otherwise.voidsetInverse(boolean not)sets if the Conditional Element has a NOT clause.-
Methods inherited from class org.mozilla.zest.core.v1.ZestElement
getElementType, isSameSubclass, setElementType
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.mozilla.zest.core.v1.ZestExpressionElement
isTrue
-
-
-
-
Method Detail
-
isLeaf
public boolean isLeaf()
Description copied from interface:ZestExpressionElementtrue if it is a Simple Conditional false otherwise.- Specified by:
isLeafin interfaceZestExpressionElement- Returns:
- true if it is a Simple Conditional false otherwise
-
isInverse
public boolean isInverse()
Description copied from interface:ZestExpressionElementreturn true if the Conditional Element has a NOT clause.- Specified by:
isInversein interfaceZestExpressionElement- Returns:
- true if the Conditional Element has a NOT clause
-
setInverse
public void setInverse(boolean not)
Description copied from interface:ZestExpressionElementsets if the Conditional Element has a NOT clause.- Specified by:
setInversein interfaceZestExpressionElement- Parameters:
not- true if this Conditional Element has to contain the NOT clause
-
evaluate
public boolean evaluate(ZestRuntime runtime)
Description copied from interface:ZestExpressionElementthe boolean value of the whole Conditional Element.- Specified by:
evaluatein interfaceZestExpressionElement- Parameters:
runtime- the runtime- Returns:
- the boolean value of the whole Conditional Element
-
deepCopy
public abstract ZestExpression deepCopy()
Description copied from class:ZestElementDeep copy.- Specified by:
deepCopyin interfaceZestExpressionElement- Specified by:
deepCopyin classZestElement- Returns:
- the zest element
- See Also:
ZestElement
-
-