code: public void update(final T dataItem) {
      // this method only uses the base buffer part of the combined buffer
  
      if (dataItem == null) { return; }
      if ((maxValue_ == null) || (comparator_.compare(dataItem, maxValue_) > 0)) { maxValue_ = dataItem; }
      if ((minValue_ == null) || (comparator_.compare(dataItem, minValue_) < 0)) { minValue_ = dataItem; }
  
      if ((baseBufferCount_ + 1) > combinedBufferItemCapacity_) {
        ItemsSketch.growBaseBuffer(this);
      }
      combinedBuffer_[baseBufferCount_++] = dataItem;
      n_++;
      if (baseBufferCount_ == (2 * k_)) {
        ItemsUtil.processFullBaseBuffer(this);
      }
    }
docs: Updates this sketch with the given double data item
  @param dataItem an item from a stream of items. NaNs are ignored.