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

Method merge

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

Source from the content-addressed store, hash-verified

4246 }
4247
4248 @Override
4249 public @Nullable V merge(
4250 K key, V newValue, BiFunction<? super V, ? super V, ? extends @Nullable V> function) {
4251 checkNotNull(key);
4252 checkNotNull(newValue);
4253 checkNotNull(function);
4254 return compute(
4255 key, (k, oldValue) -> (oldValue == null) ? newValue : function.apply(oldValue, newValue));
4256 }
4257
4258 @Override
4259 public void putAll(Map<? extends K, ? extends V> m) {

Callers

nothing calls this directly

Calls 3

computeMethod · 0.95
applyMethod · 0.65
checkNotNullMethod · 0.45

Tested by

no test coverage detected