public final class ScheduleSpec extends Object implements MetaDefItem, Serializable
Constructor and Description |
---|
ScheduleSpec()
Constructor - for unit testing, initialize to all wildcards but leave seconds empty.
|
ScheduleSpec(EnumMap<ScheduleUnit,SortedSet<Integer>> unitValues,
String optionalTimeZone,
CronParameter optionalDayOfMonthOperator,
CronParameter optionalDayOfWeekOperator) |
Modifier and Type | Method and Description |
---|---|
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) |
CronParameter |
getOptionalDayOfMonthOperator() |
CronParameter |
getOptionalDayOfWeekOperator() |
String |
getOptionalTimeZone() |
EnumMap<ScheduleUnit,SortedSet<Integer>> |
getUnitValues()
Return map of ordered set of valid schedule values for minute, hour, day, month etc.
|
int |
hashCode() |
void |
setOptionalTimeZone(String optionalTimeZone) |
String |
toString() |
protected static void |
validate(Map<ScheduleUnit,SortedSet<Integer>> unitValues)
Validate units and their value sets.
|
public ScheduleSpec(EnumMap<ScheduleUnit,SortedSet<Integer>> unitValues, String optionalTimeZone, CronParameter optionalDayOfMonthOperator, CronParameter optionalDayOfWeekOperator) throws IllegalArgumentException
IllegalArgumentException
public ScheduleSpec()
public CronParameter getOptionalDayOfMonthOperator()
public CronParameter getOptionalDayOfWeekOperator()
public void setOptionalTimeZone(String optionalTimeZone)
public final EnumMap<ScheduleUnit,SortedSet<Integer>> getUnitValues()
public String getOptionalTimeZone()
public final void addValue(ScheduleUnit element, int value)
element
- to addvalue
- to addprotected 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