 this.sortedTasks_[this.firstTaskIndex_].end.
       */
      this.firstTaskIndex_ =
          sortedTasks.findIndex(task => startTime < task.end);
      if (this.firstTaskIndex_ === -1) {
        this.firstTaskIndex_ = sortedTasks.length;
      }
      /**
       * @private {number} The index of the last task in the sortedTasks that
       *     starts before this window ends:
       *     this.range.max > this.sortedTasks_[lastTaskIndex_].start.
       */
      this.lastTaskIndex_ = -1;
      while (this.