(K key)
| 413 | } |
| 414 | |
| 415 | private boolean isInRange(K key) { |
| 416 | Comparator<? super K> cmp = backingMap.comparator; |
| 417 | if (cmp == null) { |
| 418 | Comparable<K> object = toComparable(key); |
| 419 | if (hasStart && object.compareTo(startKey) < 0) { |
| 420 | return false; |
| 421 | } |
| 422 | if (hasEnd && object.compareTo(endKey) >= 0) { |
| 423 | return false; |
| 424 | } |
| 425 | } else { |
| 426 | if (hasStart && cmp.compare(key, startKey) < 0) { |
| 427 | return false; |
| 428 | } |
| 429 | if (hasEnd && cmp.compare(key, endKey) >= 0) { |
| 430 | return false; |
| 431 | } |
| 432 | } |
| 433 | return true; |
| 434 | } |
| 435 | |
| 436 | private boolean checkUpperBound(K key) { |
| 437 | if (hasEnd) { |
no test coverage detected