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

Method span

output/java_guava/1.4.17/TreeRangeMap.java:344–367  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

342 }
343
344 @Override
345 public Range<K> span() {
346 Cut<K> lowerBound;
347 Entry<Cut<K>, RangeMapEntry<K, V>> lowerEntry = entriesByLowerBound.floorEntry(subRange.lowerBound);
348 if (lowerEntry != null
349 && lowerEntry.getValue().getUpperBound().compareTo(subRange.lowerBound) > 0) {
350 lowerBound = subRange.lowerBound;
351 } else {
352 lowerBound = entriesByLowerBound.ceilingKey(subRange.lowerBound);
353 if (lowerBound == null || lowerBound.compareTo(subRange.upperBound) >= 0) {
354 throw new NoSuchElementException();
355 }
356 }
357 Cut<K> upperBound;
358 Entry<Cut<K>, RangeMapEntry<K, V>> upperEntry = entriesByLowerBound.lowerEntry(subRange.upperBound);
359 if (upperEntry == null) {
360 throw new NoSuchElementException();
361 } else if (upperEntry.getValue().getUpperBound().compareTo(subRange.upperBound) >= 0) {
362 upperBound = subRange.upperBound;
363 } else {
364 upperBound = upperEntry.getValue().getUpperBound();
365 }
366 return Range.create(lowerBound, upperBound);
367 }
368
369 @Override
370 public void put(Range<K> range, V value) {

Callers

nothing calls this directly

Calls 7

createMethod · 0.95
getValueMethod · 0.65
floorEntryMethod · 0.45
compareToMethod · 0.45
getUpperBoundMethod · 0.45
ceilingKeyMethod · 0.45
lowerEntryMethod · 0.45

Tested by

no test coverage detected