Class BetweenExpression
java.lang.Object
com.espertech.esper.common.client.soda.ExpressionBase
com.espertech.esper.common.client.soda.BetweenExpression
- All Implemented Interfaces:
Expression
,Serializable
Between checks that a given value is in a range between a low endpoint and a high endpoint.
Closed and open ranges (endpoint included or excluded) are supported by this class, as is not-between.
- See Also:
-
Constructor Summary
ConstructorDescriptionCtor.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. -
Method Summary
Modifier and TypeMethodDescriptionReturns precedence.boolean
True if the high endpoint is included.boolean
True if the low endpoint is included.boolean
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.Methods inherited from class com.espertech.esper.common.client.soda.ExpressionBase
addChild, getChildren, getTreeObjectName, renderAggregation, setChildren, setTreeObjectName, toEPL, toPrecedenceFreeEPL, toPrecedenceFreeEPL
-
Constructor Details
-
BetweenExpression
public BetweenExpression()Ctor. -
BetweenExpression
Ctor, creates a between range check.- Parameters:
datapoint
- provides the datapointlower
- provides lower boundaryhigher
- provides upper boundary
-
BetweenExpression
public BetweenExpression(boolean lowEndpointIncluded, boolean highEndpointIncluded, boolean notBetween) Ctor - for use to create an expression tree, without child expression.Use add methods to add child expressions to acts upon.
- Parameters:
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 between
-
BetweenExpression
public BetweenExpression(Expression datapoint, Expression lower, Expression higher, boolean lowEndpointIncluded, boolean highEndpointIncluded, boolean notBetween) Ctor.- Parameters:
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 between
-
-
Method Details
-
getPrecedence
Description copied from interface:Expression
Returns precedence.- Returns:
- precedence
-
toPrecedenceFreeEPL
Renders the clause in textual representation.- Specified by:
toPrecedenceFreeEPL
in classExpressionBase
- Parameters:
writer
- to output to
-
isLowEndpointIncluded
public boolean isLowEndpointIncluded()True if the low endpoint is included.- Returns:
- true for inclusive range.
-
setLowEndpointIncluded
public void setLowEndpointIncluded(boolean lowEndpointIncluded) Set to true to indicate that the low endpoint is included (the default).- Parameters:
lowEndpointIncluded
- true for inclusive
-
isHighEndpointIncluded
public boolean isHighEndpointIncluded()True if the high endpoint is included.- Returns:
- true for inclusive range.
-
setHighEndpointIncluded
public void setHighEndpointIncluded(boolean highEndpointIncluded) Set to true to indicate that the high endpoint is included (the default).- Parameters:
highEndpointIncluded
- true for inclusive
-
isNotBetween
public boolean isNotBetween()Returns true for not-between, or false for between range.- Returns:
- false is the default range check, true checks if the value is outside of the range
-
setNotBetween
public void setNotBetween(boolean notBetween) Set to true for not-between, or false for between range.- Parameters:
notBetween
- false is the default range check, true checks if the value is outside of the range
-