MCPcopy Create free account
hub / github.com/antlr/codebuff / getIfPresent

Method getIfPresent

output/java_guava/1.4.13/LocalCache.java:3978–3988  ·  view source on GitHub ↗
(Object key)

Source from the content-addressed store, hash-verified

3976 }
3977
3978 @Nullable
3979 public V getIfPresent(Object key) {
3980 int hash = hash(checkNotNull(key));
3981 V value = segmentFor(hash).get(key, hash);
3982 if (value == null) {
3983 globalStatsCounter.recordMisses(1);
3984 } else {
3985 globalStatsCounter.recordHits(1);
3986 }
3987 return value;
3988 }
3989
3990 // Only becomes available in Java 8 when it's on the interface.
3991 // @Override

Callers

nothing calls this directly

Calls 6

hashMethod · 0.65
getMethod · 0.65
recordMissesMethod · 0.65
recordHitsMethod · 0.65
checkNotNullMethod · 0.45
segmentForMethod · 0.45

Tested by

no test coverage detected