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

Method compute

guava/src/com/google/common/cache/LocalCache.java:4224–4231  ·  guava/src/com/google/common/cache/LocalCache.java::LocalCache.compute
(
      K key, BiFunction<? super K, ? super @Nullable V, ? extends @Nullable V> function)

Source from the content-addressed store, hash-verified

4222 }
4223
4224 @Override
4225 public @Nullable V compute(
4226 K key, BiFunction<? super K, ? super @Nullable V, ? extends @Nullable V> function) {
4227 checkNotNull(key);
4228 checkNotNull(function);
4229 int hash = hash(key);
4230 return segmentFor(hash).compute(key, hash, function);
4231 }
4232
4233 @Override
4234 public V computeIfAbsent(K key, Function<? super K, ? extends V> function) {

Callers 15

computeIfAbsentMethod · 0.95
computeIfPresentMethod · 0.95
mergeMethod · 0.95
computeMethod · 0.45
updateAndGetMethod · 0.45
getAndUpdateMethod · 0.45
putIfAbsentMethod · 0.45
testComputeEvictionMethod · 0.45
testUpdatesMethod · 0.45
testComputeMethod · 0.45
testComputeWithLoadMethod · 0.45

Calls 3

hashMethod · 0.95
segmentForMethod · 0.95
checkNotNullMethod · 0.45