net.esper.type
Class CronParameter

java.lang.Object
  extended by net.esper.type.CronParameter
All Implemented Interfaces:
Serializable, EQLParameterType, NumberSetParameter, MetaDefItem

public class CronParameter
extends Object
implements NumberSetParameter

Hold parameters for timer:at.

See Also:
Serialized Form

Nested Class Summary
static class CronParameter.CronOperator
          Enumeration for special keywords in crontab timer.
 
Constructor Summary
CronParameter(String cronOperator, String day)
          Ctor.
 
Method Summary
 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 setMonth(int month)
          Sets the month value.
 void toEQL(StringWriter writer)
          Returns the EQL representation of the parameter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CronParameter

public CronParameter(String cronOperator,
                     String day)
Ctor.

Parameters:
cronOperator - is the operator as text
day - is the day text
Method Detail

toEQL

public void toEQL(StringWriter writer)
Description copied from interface: EQLParameterType
Returns the EQL representation of the parameter.

Specified by:
toEQL in interface EQLParameterType
Specified by:
toEQL in interface NumberSetParameter
Parameters:
writer - for output to

setMonth

public void setMonth(int month)
Sets the month value.

Parameters:
month - to set

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