Class: IntervalScheduler

IntervalScheduler()

new IntervalScheduler()

Author:
Source:

Members

intervals :Array.<Interval>

Type:
Source:

observable :Observable.<IntervalEventSimple>

Type:
Source:

Methods

addInterval(interval) → {this}

Parameters:
Name Type Description
interval Interval
Source:
Returns:
Type
this

addSchedule(schedule) → {this}

Calls addInterval() with the given Schedule.
Parameters:
Name Type Description
schedule Interval
Source:
Returns:
Type
this

getObservableForSchedule(interval) → {Observable.<IntervalEventSimple>}

Returns an Observable for the given Interval. Note that, for finished Intervals, an empty Observable is returned.
Parameters:
Name Type Description
interval Schedule | Interval Must be an instance of Interval
Source:
Returns:
Type
Observable.<IntervalEventSimple>

hasInterval(interval) → {Boolean}

Parameters:
Name Type Description
interval Interval
Source:
Returns:
Type
Boolean

hasSchedule(schedule) → {Boolean}

Calls hasInterval() with the given Schedule.
Parameters:
Name Type Description
schedule Interval
Source:
Returns:
Type
Boolean

(generator) preliminaryEvents(after, before) → {IterableIterator.<PreliminaryScheduleEvent.<Interval, undefined>>}

Parameters:
Name Type Description
after Date
before Date
Source:
Returns:
Type
IterableIterator.<PreliminaryScheduleEvent.<Interval, undefined>>

removeAllSchedules() → {Array.<Interval>}

Removes all Intervals and returns them. This will lead to the un-scheduling of all Intervals.
Source:
Returns:
Type
Array.<Interval>

removeInterval(interval) → {this}

Parameters:
Name Type Description
interval Interval
Source:
Returns:
Type
this

removeSchedule(schedule) → {this}

Calls removeInterval() with the given schedule.
Parameters:
Name Type Description
schedule Interval
Source:
Returns:
Type
this