|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.espertech.esper.schedule.ScheduleSpec
public final class ScheduleSpec
Holds a schedule specification which consists of a set of integer values or a null value for each schedule unit to indicate a wildcard. There is always an element in the specification for each unit minutes, hours, day of month, month, and day of week. There is optionally an element in the specification for the unit seconds.
Constructor Summary | |
---|---|
ScheduleSpec()
Constructor - for unit testing, initialize to all wildcards but leave seconds empty. |
|
ScheduleSpec(EnumMap<ScheduleUnit,SortedSet<Integer>> unitValues)
Constructor - validates that all mandatory schedule. |
Method Summary | |
---|---|
void |
addValue(ScheduleUnit element,
int value)
For unit testing, add a single value, changing wildcards to value sets. |
protected static void |
compress(Map<ScheduleUnit,SortedSet<Integer>> unitValues)
Function to reduce value sets for unit that cover the whole range down to a wildcard. |
boolean |
equals(Object otherObject)
|
EnumMap<ScheduleUnit,SortedSet<Integer>> |
getUnitValues()
Return map of ordered set of valid schedule values for minute, hour, day, month etc. |
int |
hashCode()
|
String |
toString()
|
protected static void |
validate(Map<ScheduleUnit,SortedSet<Integer>> unitValues)
Validate units and their value sets. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ScheduleSpec(EnumMap<ScheduleUnit,SortedSet<Integer>> unitValues) throws IllegalArgumentException
unitValues
- are the values for each minute, hour, day, month etc.
IllegalArgumentException
- - if validation of value set per unit failspublic ScheduleSpec()
Method Detail |
---|
public final EnumMap<ScheduleUnit,SortedSet<Integer>> getUnitValues()
public final void addValue(ScheduleUnit element, int value)
element
- to addvalue
- to addpublic final String toString()
toString
in class Object
public final boolean equals(Object otherObject)
equals
in class Object
public int hashCode()
hashCode
in class Object
protected static void compress(Map<ScheduleUnit,SortedSet<Integer>> unitValues)
unitValues
- is the set of valid values per unitprotected static void validate(Map<ScheduleUnit,SortedSet<Integer>> unitValues)
unitValues
- is the set of valid values per unit
|
© 2007 EsperTech Inc. All rights reserved. Visit us at espertech.com |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |