com.espertech.esper.type
Class RangeParameter

java.lang.Object
  extended by com.espertech.esper.type.RangeParameter
All Implemented Interfaces:
EPLParameterType, NumberSetParameter, MetaDefItem, Serializable

public class RangeParameter
extends Object
implements NumberSetParameter

Represents a range of numbers as a parameter.

See Also:
Serialized Form

Constructor Summary
RangeParameter(int low, int high)
          Ctor.
 
Method Summary
 int getHigh()
          Returns end of range.
 int getLow()
          Returns start of range.
 Set<Integer> getValuesInRange(int min, int max)
          Return a set of int values representing the value of the parameter for the given range.
 boolean isWildcard(int min, int max)
          Returns true if all values between and including min and max are supplied by the parameter.
 void toEPL(StringWriter writer)
          Returns the EPL representation of the parameter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RangeParameter

public RangeParameter(int low,
                      int high)
Ctor.

Parameters:
low - - start of range
high - - end of range
Method Detail

getLow

public int getLow()
Returns start of range.

Returns:
start of range

getHigh

public int getHigh()
Returns end of range.

Returns:
end of range

isWildcard

public boolean isWildcard(int min,
                          int max)
Description copied from interface: NumberSetParameter
Returns true if all values between and including min and max are supplied by the parameter.

Specified by:
isWildcard in interface NumberSetParameter
Parameters:
min - - lower end of range
max - - upper end of range
Returns:
true if parameter specifies all int values between min and max, false if not

getValuesInRange

public Set<Integer> getValuesInRange(int min,
                                     int max)
Description copied from interface: NumberSetParameter
Return a set of int values representing the value of the parameter for the given range.

Specified by:
getValuesInRange in interface NumberSetParameter
Parameters:
min - - lower end of range
max - - upper end of range
Returns:
set of integer

toEPL

public void toEPL(StringWriter writer)
Description copied from interface: EPLParameterType
Returns the EPL representation of the parameter.

Specified by:
toEPL in interface EPLParameterType
Specified by:
toEPL in interface NumberSetParameter
Parameters:
writer - for output to

© 2007 EsperTech Inc.
All rights reserved.
Visit us at espertech.com