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

Method getEntry

output/java_guava/1.4.17/ImmutableRangeMap.java:183–193  ·  view source on GitHub ↗
(K key)

Source from the content-addressed store, hash-verified

181 }
182
183 @Override
184 @Nullable
185 public Map.Entry<Range<K>, V> getEntry(K key) {
186 int index = SortedLists.binarySearch(ranges, Range.<K>lowerBoundFn(), Cut.belowValue(key), KeyPresentBehavior.ANY_PRESENT, KeyAbsentBehavior.NEXT_LOWER);
187 if (index == -1) {
188 return null;
189 } else {
190 Range<K> range = ranges.get(index);
191 return range.contains(key) ? Maps.immutableEntry(range, values.get(index)) : null;
192 }
193 }
194
195 @Override
196 public Range<K> span() {

Callers

nothing calls this directly

Calls 6

binarySearchMethod · 0.95
lowerBoundFnMethod · 0.95
belowValueMethod · 0.95
immutableEntryMethod · 0.95
getMethod · 0.65
containsMethod · 0.65

Tested by

no test coverage detected