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

Method get

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

Source from the content-addressed store, hash-verified

169 }
170
171 @Override
172 @Nullable
173 public V get(K key) {
174 int index = SortedLists.binarySearch(ranges, Range.<K>lowerBoundFn(), Cut.belowValue(key), KeyPresentBehavior.ANY_PRESENT, KeyAbsentBehavior.NEXT_LOWER);
175 if (index == -1) {
176 return null;
177 } else {
178 Range<K> range = ranges.get(index);
179 return range.contains(key) ? values.get(index) : null;
180 }
181 }
182
183 @Override
184 @Nullable

Callers

nothing calls this directly

Calls 7

binarySearchMethod · 0.95
lowerBoundFnMethod · 0.95
belowValueMethod · 0.95
getMethod · 0.65
containsMethod · 0.65
checkElementIndexMethod · 0.45
intersectionMethod · 0.45

Tested by

no test coverage detected