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

Method span

guava/src/com/google/common/collect/TreeRangeMap.java:195–205  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

193 }
194
195 @Override
196 public Range<K> span() {
197 Entry<Cut<K>, RangeMapEntry<K, V>> firstEntry = entriesByLowerBound.firstEntry();
198 Entry<Cut<K>, RangeMapEntry<K, V>> lastEntry = entriesByLowerBound.lastEntry();
199 // Either both are null or neither is, but we check both to satisfy the nullness checker.
200 if (firstEntry == null || lastEntry == null) {
201 throw new NoSuchElementException();
202 }
203 return Range.create(
204 firstEntry.getValue().getKey().lowerBound, lastEntry.getValue().getKey().upperBound);
205 }
206
207 private void putRangeMapEntry(Cut<K> lowerBound, Cut<K> upperBound, V value) {
208 entriesByLowerBound.put(lowerBound, new RangeMapEntry<K, V>(lowerBound, upperBound, value));

Callers

nothing calls this directly

Calls 5

createMethod · 0.95
firstEntryMethod · 0.65
lastEntryMethod · 0.65
getKeyMethod · 0.65
getValueMethod · 0.65

Tested by

no test coverage detected