public final class ScheduleSpec extends java.lang.Object implements MetaDefItem, java.io.Serializable
Constructor and Description |
---|
ScheduleSpec()
Constructor - for unit testing, initialize to all wildcards but leave seconds empty.
|
ScheduleSpec(java.util.EnumMap<ScheduleUnit,java.util.SortedSet<java.lang.Integer>> unitValues,
java.lang.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(java.util.Map<ScheduleUnit,java.util.SortedSet<java.lang.Integer>> unitValues)
Function to reduce value sets for unit that cover the whole range down to a wildcard.
|
boolean |
equals(java.lang.Object otherObject) |
CronParameter |
getOptionalDayOfMonthOperator() |
CronParameter |
getOptionalDayOfWeekOperator() |
java.lang.String |
getOptionalTimeZone() |
java.util.EnumMap<ScheduleUnit,java.util.SortedSet<java.lang.Integer>> |
getUnitValues()
Return map of ordered set of valid schedule values for minute, hour, day, month etc.
|
int |
hashCode() |
void |
setOptionalTimeZone(java.lang.String optionalTimeZone) |
java.lang.String |
toString() |
protected static void |
validate(java.util.Map<ScheduleUnit,java.util.SortedSet<java.lang.Integer>> unitValues)
Validate units and their value sets.
|
public ScheduleSpec(java.util.EnumMap<ScheduleUnit,java.util.SortedSet<java.lang.Integer>> unitValues, java.lang.String optionalTimeZone, CronParameter optionalDayOfMonthOperator, CronParameter optionalDayOfWeekOperator) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
public ScheduleSpec()
public CronParameter getOptionalDayOfMonthOperator()
public CronParameter getOptionalDayOfWeekOperator()
public void setOptionalTimeZone(java.lang.String optionalTimeZone)
public final java.util.EnumMap<ScheduleUnit,java.util.SortedSet<java.lang.Integer>> getUnitValues()
public java.lang.String getOptionalTimeZone()
public final void addValue(ScheduleUnit element, int value)
element
- to addvalue
- to addpublic final java.lang.String toString()
toString
in class java.lang.Object
public final boolean equals(java.lang.Object otherObject)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
protected static void compress(java.util.Map<ScheduleUnit,java.util.SortedSet<java.lang.Integer>> unitValues)
unitValues
- is the set of valid values per unitprotected static void validate(java.util.Map<ScheduleUnit,java.util.SortedSet<java.lang.Integer>> unitValues)
unitValues
- is the set of valid values per unit