MCPcopy Index your code
hub / github.com/davidgiven/luje / subMap

Method subMap

lib/java/util/TreeMap.java:2292–2303  ·  view source on GitHub ↗

Returns a sorted map over a range of this sorted map with all keys greater than or equal to the specified startKey and less than the specified endKey. Changes to the returned sorted map are reflected in this sorted map and vice versa. Note: The returned map will not allow an inse

(K startKey, K endKey)

Source from the content-addressed store, hash-verified

2290 * the specified range is outside of its range.
2291 */
2292 public SortedMap<K, V> subMap(K startKey, K endKey) {
2293 if (comparator == null) {
2294 if (toComparable(startKey).compareTo(endKey) <= 0) {
2295 return new SubMap<K, V>(startKey, this, endKey);
2296 }
2297 } else {
2298 if (comparator.compare(startKey, endKey) <= 0) {
2299 return new SubMap<K, V>(startKey, this, endKey);
2300 }
2301 }
2302 throw new IllegalArgumentException();
2303 }
2304
2305 /**
2306 * Returns a sorted map over a range of this sorted map with all keys that

Callers

nothing calls this directly

Calls 3

toComparableMethod · 0.95
compareToMethod · 0.65
compareMethod · 0.65

Tested by

no test coverage detected