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

Method putIfAbsent

guava/src/com/google/common/cache/LocalCache.java:4216–4222  ·  guava/src/com/google/common/cache/LocalCache.java::LocalCache.putIfAbsent
(K key, V value)

Source from the content-addressed store, hash-verified

4214 }
4215
4216 @Override
4217 public @Nullable V putIfAbsent(K key, V value) {
4218 checkNotNull(key);
4219 checkNotNull(value);
4220 int hash = hash(key);
4221 return segmentFor(hash).put(key, hash, value, true);
4222 }
4223
4224 @Override
4225 public @Nullable V compute(

Callers 1

registerMethod · 0.45

Calls 4

hashMethod · 0.95
segmentForMethod · 0.95
putMethod · 0.65
checkNotNullMethod · 0.45

Tested by

no test coverage detected