com.espertech.esper.client.soda
Class BetweenExpression

java.lang.Object
  extended by com.espertech.esper.client.soda.ExpressionBase
      extended by com.espertech.esper.client.soda.BetweenExpression
All Implemented Interfaces:
Expression, java.io.Serializable

public class BetweenExpression
extends ExpressionBase

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:
Serialized Form

Constructor Summary
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.
 
Method Summary
 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(java.io.StringWriter writer)
          Renders the clause in textual representation.
 
Methods inherited from class com.espertech.esper.client.soda.ExpressionBase
addChild, getChildren, getTreeObjectName, renderAggregation, setChildren, setTreeObjectName, toEPL, toPrecedenceFreeEPL, toPrecedenceFreeEPL
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BetweenExpression

public BetweenExpression()
Ctor.


BetweenExpression

public BetweenExpression(Expression datapoint,
                         Expression lower,
                         Expression higher)
Ctor, creates a between range check.

Parameters:
datapoint - provides the datapoint
lower - provides lower boundary
higher - 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 not
highEndpointIncluded - true if the high endpoint is included, false if not
notBetween - 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 datapoint
lower - provides lower boundary
higher - provides upper boundary
lowEndpointIncluded - true if the low endpoint is included, false if not
highEndpointIncluded - true if the high endpoint is included, false if not
notBetween - true for not-between, false for between
Method Detail

getPrecedence

public ExpressionPrecedenceEnum getPrecedence()
Description copied from interface: Expression
Returns precedence.

Returns:
precedence

toPrecedenceFreeEPL

public void toPrecedenceFreeEPL(java.io.StringWriter writer)
Renders the clause in textual representation.

Specified by:
toPrecedenceFreeEPL in class ExpressionBase
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

© 2006-2015 EsperTech Inc.
All rights reserved.
Visit us at espertech.com