code: public long setMaxItems(long n) {
      if (n >= numItems) {
        this.maxNumItems = n;
      } else if (this.maxNumItems >= this.numItems) {
        this.maxNumItems = this.numItems;
      }
      return this.maxNumItems;
    }
docs: Set the limit on the number of unique values
  @param n the desired limit on the number of unique values
  @return the new limit on the number of unique values