net.esper.client.soda
Class BetweenExpression

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

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(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
 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 toEQL(StringWriter writer)
          Renders the expressions and all it's child expression, in full tree depth, as a string in language syntax.
 
Methods inherited from class net.esper.client.soda.ExpressionBase
addChild, getChildren
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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

toEQL

public void toEQL(StringWriter writer)
Description copied from interface: Expression
Renders the expressions and all it's child expression, in full tree depth, as a string in language syntax.

Parameters:
writer - is the output to use

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