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)
| 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 |
nothing calls this directly
no test coverage detected