public class BetweenExpression extends ExpressionBase
Closed and open ranges (endpoint included or excluded) are supported by this class, as is not-between.
Constructor and Description |
---|
BetweenExpression()
Ctor.
|
BetweenExpression(boolean lowEndpointIncluded,
boolean highEndpointIncluded,
boolean notBetween)
Ctor - for use to create an expression tree, without child expression.
|
BetweenExpression(Expression datapoint,
Expression lower,
Expression higher)
Ctor, creates a between range check.
|
BetweenExpression(Expression datapoint,
Expression lower,
Expression higher,
boolean lowEndpointIncluded,
boolean highEndpointIncluded,
boolean notBetween)
Ctor.
|
Modifier and Type | Method and Description |
---|---|
ExpressionPrecedenceEnum |
getPrecedence()
Returns precedence.
|
boolean |
isHighEndpointIncluded()
True if the high endpoint is included.
|
boolean |
isLowEndpointIncluded()
True if the low endpoint is included.
|
boolean |
isNotBetween()
Returns true for not-between, or false for between range.
|
void |
setHighEndpointIncluded(boolean highEndpointIncluded)
Set to true to indicate that the high endpoint is included (the default).
|
void |
setLowEndpointIncluded(boolean lowEndpointIncluded)
Set to true to indicate that the low endpoint is included (the default).
|
void |
setNotBetween(boolean notBetween)
Set to true for not-between, or false for between range.
|
void |
toPrecedenceFreeEPL(StringWriter writer)
Renders the clause in textual representation.
|
addChild, getChildren, getTreeObjectName, renderAggregation, setChildren, setTreeObjectName, toEPL, toPrecedenceFreeEPL, toPrecedenceFreeEPL
public BetweenExpression()
public BetweenExpression(Expression datapoint, Expression lower, Expression higher)
datapoint
- provides the datapointlower
- provides lower boundaryhigher
- provides upper boundarypublic BetweenExpression(boolean lowEndpointIncluded, boolean highEndpointIncluded, boolean notBetween)
Use add methods to add child expressions to acts upon.
lowEndpointIncluded
- true if the low endpoint is included, false if nothighEndpointIncluded
- true if the high endpoint is included, false if notnotBetween
- true for not-between, false for betweenpublic BetweenExpression(Expression datapoint, Expression lower, Expression higher, boolean lowEndpointIncluded, boolean highEndpointIncluded, boolean notBetween)
datapoint
- provides the datapointlower
- provides lower boundaryhigher
- provides upper boundarylowEndpointIncluded
- true if the low endpoint is included, false if nothighEndpointIncluded
- true if the high endpoint is included, false if notnotBetween
- true for not-between, false for betweenpublic ExpressionPrecedenceEnum getPrecedence()
Expression
public void toPrecedenceFreeEPL(StringWriter writer)
toPrecedenceFreeEPL
in class ExpressionBase
writer
- to output topublic boolean isLowEndpointIncluded()
public void setLowEndpointIncluded(boolean lowEndpointIncluded)
lowEndpointIncluded
- true for inclusivepublic boolean isHighEndpointIncluded()
public void setHighEndpointIncluded(boolean highEndpointIncluded)
highEndpointIncluded
- true for inclusivepublic boolean isNotBetween()
public void setNotBetween(boolean notBetween)
notBetween
- false is the default range check, true checks if the value is outside of the range