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

Method getIfPresent

output/java_guava/1.4.17/LocalCache.java:3995–4005  ·  view source on GitHub ↗
(Object key)

Source from the content-addressed store, hash-verified

3993 }
3994
3995 @Nullable
3996 public V getIfPresent(Object key) {
3997 int hash = hash(checkNotNull(key));
3998 V value = segmentFor(hash).get(key, hash);
3999 if (value == null) {
4000 globalStatsCounter.recordMisses(1);
4001 } else {
4002 globalStatsCounter.recordHits(1);
4003 }
4004 return value;
4005 }
4006
4007 // Only becomes available in Java 8 when it's on the interface.
4008 // @Override

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected