(K key)
| 500 | } |
| 501 | |
| 502 | private void checkRange(K key) { |
| 503 | Comparator<? super K> cmp = backingMap.comparator; |
| 504 | if (cmp == null) { |
| 505 | java.lang.Comparable<K> object = toComparable(key); |
| 506 | if (hasStart && object.compareTo(startKey) < 0) { |
| 507 | throw new IllegalArgumentException(); |
| 508 | } |
| 509 | if (hasEnd && object.compareTo(endKey) >= 0) { |
| 510 | throw new IllegalArgumentException(); |
| 511 | } |
| 512 | } else { |
| 513 | if (hasStart |
| 514 | && backingMap.comparator().compare(key, startKey) < 0) { |
| 515 | throw new IllegalArgumentException(); |
| 516 | } |
| 517 | if (hasEnd && backingMap.comparator().compare(key, endKey) >= 0) { |
| 518 | throw new IllegalArgumentException(); |
| 519 | } |
| 520 | } |
| 521 | } |
| 522 | |
| 523 | private boolean isInRange(K key) { |
| 524 | Comparator<? super K> cmp = backingMap.comparator; |
no test coverage detected