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

Method isInRange

lib/java/util/TreeMap.java:415–434  ·  view source on GitHub ↗
(K key)

Source from the content-addressed store, hash-verified

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) {

Callers 5

containsKeyMethod · 0.95
getMethod · 0.95
putMethod · 0.95
removeMethod · 0.95
containsMethod · 0.80

Calls 3

toComparableMethod · 0.80
compareToMethod · 0.65
compareMethod · 0.65

Tested by

no test coverage detected