MCPcopy
hub / github.com/google/guava / computeIfPresent

Method computeIfPresent

guava/src/com/google/common/cache/LocalCache.java:4240–4246  ·  view source on GitHub ↗
(
      K key, BiFunction<? super K, ? super V, ? extends @Nullable V> function)

Source from the content-addressed store, hash-verified

4238 }
4239
4240 @Override
4241 public @Nullable V computeIfPresent(
4242 K key, BiFunction<? super K, ? super V, ? extends @Nullable V> function) {
4243 checkNotNull(key);
4244 checkNotNull(function);
4245 return compute(key, (k, oldValue) -> (oldValue == null) ? null : function.apply(k, oldValue));
4246 }
4247
4248 @Override
4249 public @Nullable V merge(

Calls 3

computeMethod · 0.95
applyMethod · 0.65
checkNotNullMethod · 0.45