updateMax(newMax) {
        if (newMax === this.max || this.isZero(newMax) || this.isNegative(newMax)) {
            return this;
        }
        if (newMax > this.max) {
            this.max = newMax;
            return this;
        }
        this.shedOlderEntries(this.max - newMax - (this.max - this.size));
        this.max = newMax;
        return this;
    }
/**
     *  Updates the max capacity of the cache. If the
     *  max capacity of the cache is less than the current max capacity
     *  and the cache is at max capacity, the cache will shed
     *  the older items.
     *  @time O(n)
     *  @param {number} newMax The value that will be the new max capacity for the cache.
     *  @return {LRUCache} This instance.
     */
Updates the max capacity of the cache. If the
max capacity of the cache is less than the current max capacity
and the cache is at max capacity, the cache will shed
the older items.
@time O(n)
@param {number} newMax The value that will be the new max capacity for the cache.
@return {LRUCache} This instance.
Updates the max capacity of the cache . If the max capacity of the cache is less than the current max capacity and the cache is at max capacity the cache will shed the older items . @time O ( n ) @param { number } newMax The value that will be the new max capacity for the cache . @return { LRUCache } This instance .
updateMax(newMax) {
        if (newMax === this.max || this.isZero(newMax) || this.isNegative(newMax)) {
            return this;
        }
        if (newMax > this.max) {
            this.max = newMax;
            return this;
        }
        this.shedOlderEntries(this.max - newMax - (this.max - this.size));
        this.max = newMax;
        return this;
    }
updateMax ( newMax ) { if ( newMax === this . max || this . isZero ( newMax ) || this . isNegative ( newMax ) ) { return this ; } if ( newMax > this . max ) { this . max = newMax ; return this ; } this . shedOlderEntries ( this . max - newMax - ( this . max - this . size ) ) ; this . max = newMax ; return this ; }
Updates the max capacity of the cache.
Updates the max capacity of the cache .