Creates a new pattern.
The unique name of the pattern.
If the pattern is "listed" Pattern.listed.
A function to describe the pattern given a Day.
The rules which describe how to detect and apply the pattern to schedule input.
The function which describes this pattern given a Day to base it on.
Whether this pattern should be "listed" or not. Visual schedulers may
provide a shortcut to describing and changing a Schedule through
patterns and any pattern where listed is true
could be an option in a
list. The default patterns are all listed.
The name of this pattern. This is not typically displayed to a user, just to uniquely identify a pattern.
The rules for matching a pattern to a Schedule or applying a pattern to a schedule.
The properties in the ScheduleInput which are compared against the rules of a pattern.
Applies this pattern to a Schedule or ScheduleInput removing and adding any necessary properties from the input to match this pattern - based around the day provided.
The schedule to update to match this pattern.
The day to base the schedule on.
The reference to the input passed in.
Applies this pattern to any object provided they implement the
setFrequency
and removeFrequency
functions.
The day to base the schedule on.
The function which sets the frequency on the object.
The function to remove a frequency from the object.
Determines whether the given Schedule or ScheduleInput matches this pattern. Optionally a day can be provided to make sure the day matches the schedule and pattern together.
The schedule input to test.
A day to further validate against for matching.
true
if the schedule was a match to this pattern with the
day if one was provided, otherwise false
.
Determines whether the given input matches this pattern. Optionally a day can be provided to make sure the day matches the schedule and pattern together.
A day to further validate against for matching.
true
if the schedule input was a match to this pattern with the
day if one was provided, otherwise false
.
Finds a matching pattern to the given input searching through Patterns
for matches. Optionally it will only look at patterns where listed = true
.
The schedule input to use.
When true
only patterns with Pattern.listed set to
true
will be looked at, otherwise all patterns are looked at.
A day to further validate against for matching.
Returns the pattern with the given name if one exists. If you add your own patterns make sure to add them to PatternMap.
The name of the pattern to return.
The instance to the pattern with the same name.
Generated using TypeDoc
A class which helps describe ScheduleInput if it matches a pattern.