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

Method getEntry

output/java_guava/1.4.16/LocalCache.java:2797–2813  ·  view source on GitHub ↗
(Object key, int hash)

Source from the content-addressed store, hash-verified

2795 // Specialized implementations of map methods
2796
2797 @Nullable
2798 ReferenceEntry<K, V> getEntry(Object key, int hash) {
2799 for (ReferenceEntry<K, V> e = getFirst(hash); e != null; e = e.getNext()) {
2800 if (e.getHash() != hash) {
2801 continue;
2802 }
2803 K entryKey = e.getKey();
2804 if (entryKey == null) {
2805 tryDrainReferenceQueues();
2806 continue;
2807 }
2808 if (map.keyEquivalence.equivalent(key, entryKey)) {
2809 return e;
2810 }
2811 }
2812 return null;
2813 }
2814
2815 @Nullable
2816 ReferenceEntry<K, V> getLiveEntry(Object key, int hash, long now) {

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