public final class BetweenCondition extends Condition
Condition that represents a BETWEEN condition, which determines whether a value is in a specific range of values. A BetweenCondition evaluates to true if the base expression is greater than or equal to the start expression and is less than or equal to the end expression.| Constructor and Description |
|---|
BetweenCondition(TypedExpression baseExpression, TypedExpression startExpression, TypedExpression endExpression)
Creates a new
BetweenCondition that has the specified base, start, and end expressions and determines whether the base value is in the range of values. |
BetweenCondition(TypedExpression baseExpression, TypedExpression startExpression, TypedExpression endExpression, boolean negate)
Creates a new
BetweenCondition that has the specified base, start, and end expressions. |
| Modifier and Type | Method and Description |
|---|---|
TypedExpression |
getBaseExpression()
Gets the
TypedExpression that has the value that is the base of the condition. |
TypedExpression |
getEndExpression()
Gets the
TypedExpression that has the value that is the end of the range of values to compare to the base value. |
TypedExpression |
getStartExpression()
Gets the
TypedExpression that has the value that is the start of the range of values to compare to the base value. |
boolean |
isNegated()
Indicates whether this
BetweenCondition determines that the base value is in the specified range or is not in the range. |
java.lang.Object |
visit(SyntaxObjectVisitor visitor, java.lang.Object context)
Calls the
visitBetweenCondition method of the SyntaxObjectVisitor and passes that method this BetweenCondition and an Object. |
and, isCompositeObject, not, orequals, equals, fromSyntax, fromSyntax, fromSyntax, fromSyntax, fromSyntax, isValid, toSyntax, toSyntax, toSyntax, toSyntax, toSyntax, toSyntaxpublic BetweenCondition(TypedExpression baseExpression, TypedExpression startExpression, TypedExpression endExpression, boolean negate)
BetweenCondition that has the specified base, start, and end expressions. The negate parameter specifies whether to determine that the base value is in the range or is not in the range.baseExpression - A TypedExpression that has the base value of the condition.startExpression - A TypedExpression that has the value that is the start of the range.endExpression - A TypedExpression that has the value that is the end of the range.negate - A boolean that is true to determine if the base value is not in the range or false to determine if the base value is in the range.public BetweenCondition(TypedExpression baseExpression, TypedExpression startExpression, TypedExpression endExpression)
BetweenCondition that has the specified base, start, and end expressions and determines whether the base value is in the range of values.baseExpression - A TypedExpression that has the base value of the condition.startExpression - A TypedExpression that has the value that is the start of the range.endExpression - A TypedExpression that has the value that is the end of the range.public java.lang.Object visit(SyntaxObjectVisitor visitor, java.lang.Object context)
visitBetweenCondition method of the SyntaxObjectVisitor and passes that method this BetweenCondition and an Object.visit in class SyntaxObjectvisitor - A SyntaxObjectVisitor.context - An Object.Object returned by the visitBetweenCondition method.public TypedExpression getBaseExpression()
TypedExpression that has the value that is the base of the condition.TypedExpression that has the value to compare to the start and end values.public TypedExpression getStartExpression()
TypedExpression that has the value that is the start of the range of values to compare to the base value.TypedExpression that has the value that is the start of the range of values.public TypedExpression getEndExpression()
TypedExpression that has the value that is the end of the range of values to compare to the base value.TypedExpression that has the value that is the end of the range of values.public boolean isNegated()
BetweenCondition determines that the base value is in the specified range or is not in the range.boolean that is true if this BetweenCondition determines whether the base value is not in the range or is false if it determines that the base value is in the range.