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

Method getEntry

guava/src/com/google/common/cache/LocalCache.java:2693–2711  ·  view source on GitHub ↗
(Object key, int hash)

Source from the content-addressed store, hash-verified

2691 // Specialized implementations of map methods
2692
2693 @Nullable ReferenceEntry<K, V> getEntry(Object key, int hash) {
2694 for (ReferenceEntry<K, V> e = getFirst(hash); e != null; e = e.getNext()) {
2695 if (e.getHash() != hash) {
2696 continue;
2697 }
2698
2699 K entryKey = e.getKey();
2700 if (entryKey == null) {
2701 tryDrainReferenceQueues();
2702 continue;
2703 }
2704
2705 if (map.keyEquivalence.equivalent(key, entryKey)) {
2706 return e;
2707 }
2708 }
2709
2710 return null;
2711 }
2712
2713 @Nullable ReferenceEntry<K, V> getLiveEntry(Object key, int hash, long now) {
2714 ReferenceEntry<K, V> e = getEntry(key, hash);

Callers 2

getMethod · 0.95
getLiveEntryMethod · 0.95

Calls 6

getFirstMethod · 0.95
getNextMethod · 0.65
getHashMethod · 0.65
getKeyMethod · 0.65
equivalentMethod · 0.45

Tested by

no test coverage detected