code: public void update(final T item, final long count) {
      if ((item == null) || (count == 0)) {
        return;
      }
      if (count < 0) {
        throw new SketchesArgumentException("Count may not be negative");
      }
      this.streamWeight += count;
      hashMap.adjustOrPutValue(item, count);
  
      if (getNumActiveItems() > curMapCap) { //over the threshold, we need to do something
        if (hashMap.getLgLength() < lgMaxMapSize) { //below tgt size, we can grow
          hashMap.resize(2 * hashMap.getLength());
          curMapCap = hashMap.getCapacity();
        } else { //At tgt size, must purge
          offset += hashMap.purge(sampleSize);
          if (getNumActiveItems() > getMaximumMapCapacity()) {
            throw new SketchesStateException("Purge did not reduce active items.");
          }
        }
      }
    }
docs: Update this sketch with a item and a positive frequency count.
  @param item for which the frequency should be increased. The item can be any long value and is
  only used by the sketch to determine uniqueness.
  @param count the amount by which the frequency of the item should be increased.
  An count of zero is a no-op, and a negative count will throw an exception.