@Override public V applyIfPresent(K key, IBiFunction<? super K, ? super V, ? extends V> remappingFunction) { checkNotNull(key); checkNotNull(remappingFunction); int hash = hashOf(key); Segment<K, V> segment = segmentFor(hash); V v = segment.get(key, hash); if (v == null) { return null; } return segmentFor(hash).applyIfPresent(key, hash, remappingFunction); }
@Override public V applyIfPresent(K key, IBiFunction<? super K, ? super V, ? extends V> remappingFunction) { checkNotNull(key); checkNotNull(remappingFunction); int hash = hashOf(key); Segment<K, V> segment = segmentFor(hash); V v = segment.get(key, hash); if (v == null) { return null; } return segmentFor(hash).applyIfPresent(key, hash, remappingFunction); }