MCPcopy Create free account
hub / github.com/davidgiven/luje / subMap

Method subMap

lib/java/util/TreeMap.java:725–739  ·  view source on GitHub ↗
(K startKey, K endKey)

Source from the content-addressed store, hash-verified

723 }
724
725 public SortedMap<K, V> subMap(K startKey, K endKey) {
726 checkRange(startKey);
727 checkRange(endKey);
728 Comparator<? super K> c = backingMap.comparator();
729 if (c == null) {
730 if (toComparable(startKey).compareTo(endKey) <= 0) {
731 return new SubMap<K, V>(startKey, backingMap, endKey);
732 }
733 } else {
734 if (c.compare(startKey, endKey) <= 0) {
735 return new SubMap<K, V>(startKey, backingMap, endKey);
736 }
737 }
738 throw new IllegalArgumentException();
739 }
740
741 public SortedMap<K, V> tailMap(K startKey) {
742 checkRange(startKey);

Callers

nothing calls this directly

Calls 5

checkRangeMethod · 0.95
toComparableMethod · 0.80
comparatorMethod · 0.65
compareToMethod · 0.65
compareMethod · 0.65

Tested by

no test coverage detected