code: protected void fill(int fromIndex, int endIndex) {
          fromIndex = fromIndex == -1 ? 0 : fromIndex;
          endIndex = endIndex == -1 || endIndex > this.timeSeries.length ? this.timeSeries.length : endIndex;
  
          final T val;
          if (applyZero()) {
              val = zero();
          } else {
              val = null;
          }
  
          // set the values
          for (int i = fromIndex; i < endIndex; i++) {
              set(i, val);
          }
      }
docs: Resets the values from [fromIndex, endIndex).
  
  @param fromIndex the index to start from (included)
  @param endIndex  the index to end (excluded)