Package org.mozilla.zest.core.v1
Interface ZestExpressionElement
-
- All Known Implementing Classes:
ZestExpression,ZestExpressionAnd,ZestExpressionClientElementExists,ZestExpressionEquals,ZestExpressionIsInteger,ZestExpressionLength,ZestExpressionOr,ZestExpressionProtocol,ZestExpressionRegex,ZestExpressionResponseTime,ZestExpressionStatusCode,ZestExpressionURL,ZestStructuredExpression
public interface ZestExpressionElementthis interface represents a Conditional Element, such as a simple
Coditional (based on regex, Status Code, ..) or a list of AND/OR
clauses
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ZestExpressionElementdeepCopy()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.booleanisTrue(ZestRuntime runtime)the boolean value result of the expression without inverse flag.voidsetInverse(boolean not)sets if the Conditional Element has a NOT clause.
-
-
-
Method Detail
-
isLeaf
boolean isLeaf()
true if it is a Simple Conditional false otherwise.- Returns:
- true if it is a Simple Conditional false otherwise
-
isTrue
boolean isTrue(ZestRuntime runtime)
the boolean value result of the expression without inverse flag.- Parameters:
runtime- the runtime- Returns:
- the boolean value of the expression without inverse flag
-
evaluate
boolean evaluate(ZestRuntime runtime)
the boolean value of the whole Conditional Element.- Parameters:
runtime- the runtime- Returns:
- the boolean value of the whole Conditional Element
-
isInverse
boolean isInverse()
return true if the Conditional Element has a NOT clause.- Returns:
- true if the Conditional Element has a NOT clause
-
setInverse
void setInverse(boolean not)
sets if the Conditional Element has a NOT clause.- Parameters:
not- true if this Conditional Element has to contain the NOT clause
-
deepCopy
ZestExpressionElement deepCopy()
Deep copy.- Returns:
- a copy of the ZestConditionalElement
- See Also:
ZestElement
-
-