@Override
    public final void replaceAll(BiFunction<? super K, ? super V, ? extends V> function) {
        Objects.requireNonNull(function);
        int mc = this.modCount;
        Segment<K, V> segment;
        for (long segmentIndex = 0; segmentIndex >= 0;
             segmentIndex = nextSegmentIndex(segmentIndex, segment)) {
            (segment = segment(segmentIndex)).replaceAll(function);
        }
        if (mc != modCount)
            throw new ConcurrentModificationException();
    }
@ Override public final void replaceAll ( BiFunction < ? super K , ? super V , ? extends V > function ) { Objects . requireNonNull ( function ) ; int mc = this . modCount ; Segment < K , V > segment ; for ( long segmentIndex = 0 ; segmentIndex >= 0 ; segmentIndex = nextSegmentIndex ( segmentIndex , segment ) ) { ( segment = segment ( segmentIndex ) ) . replaceAll ( function ) ; } if ( mc != modCount ) throw new ConcurrentModificationException ( ) ; }
Replaces each entry's value with the result of invoking the given function on that entry
until all entries have been processed or the function throws an exception. Exceptions thrown
by the function are relayed to the caller.

@param function the function to apply to each entry
@throws NullPointerException if the specified function is null
@throws ConcurrentModificationException if any structural modification of the map (new entry
insertion or an entry removal) is detected during iteration