function TimeIntervalCollection(intervals) {
  this._intervals = [];
  this._changedEvent = new Event();

  if (defined(intervals)) {
    const length = intervals.length;
    for (let i = 0; i < length; i++) {
      this.addInterval(intervals[i]);
    }
  }
}
A non-overlapping collection of {@link TimeInterval} instances sorted by start time.
@alias TimeIntervalCollection
@constructor

@param {TimeInterval[]} [intervals] An array of intervals to add to the collection.