(K key)
| 392 | } |
| 393 | |
| 394 | private void checkRange(K key) { |
| 395 | Comparator<? super K> cmp = backingMap.comparator; |
| 396 | if (cmp == null) { |
| 397 | Comparable<K> object = toComparable(key); |
| 398 | if (hasStart && object.compareTo(startKey) < 0) { |
| 399 | throw new IllegalArgumentException(); |
| 400 | } |
| 401 | if (hasEnd && object.compareTo(endKey) > 0) { |
| 402 | throw new IllegalArgumentException(); |
| 403 | } |
| 404 | } else { |
| 405 | if (hasStart |
| 406 | && backingMap.comparator().compare(key, startKey) < 0) { |
| 407 | throw new IllegalArgumentException(); |
| 408 | } |
| 409 | if (hasEnd && backingMap.comparator().compare(key, endKey) > 0) { |
| 410 | throw new IllegalArgumentException(); |
| 411 | } |
| 412 | } |
| 413 | } |
| 414 | |
| 415 | private boolean isInRange(K key) { |
| 416 | Comparator<? super K> cmp = backingMap.comparator; |
no test coverage detected