MCPcopy Create free account
hub / github.com/apache/calcite / range

Method range

core/src/main/java/org/apache/calcite/util/NameMap.java:76–88  ·  view source on GitHub ↗

Returns a map containing all the entries in the map that match the given name. If case-sensitive, that map will have 0 or 1 elements; if case-insensitive, it may have 0 or more.

(String name, boolean caseSensitive)

Source from the content-addressed store, hash-verified

74 * name. If case-sensitive, that map will have 0 or 1 elements; if
75 * case-insensitive, it may have 0 or more. */
76 public NavigableMap<String, V> range(String name, boolean caseSensitive) {
77 Object floorKey;
78 Object ceilingKey;
79 if (caseSensitive) {
80 floorKey = name;
81 ceilingKey = name;
82 } else {
83 floorKey = COMPARATOR.floorKey(name);
84 ceilingKey = COMPARATOR.ceilingKey(name);
85 }
86 NavigableMap subMap = ((NavigableMap) map).subMap(floorKey, true, ceilingKey, true);
87 return Collections.unmodifiableNavigableMap((NavigableMap<String, V>) subMap);
88 }
89
90 /** Returns whether this map contains a given key, with a given
91 * case-sensitivity. */

Callers 4

checkNameMapMethod · 0.95
checkNameMultimapMethod · 0.95
testNameMapMethod · 0.95
containsKeyMethod · 0.95

Calls 2

floorKeyMethod · 0.80
ceilingKeyMethod · 0.80

Tested by 3

checkNameMapMethod · 0.76
checkNameMultimapMethod · 0.76
testNameMapMethod · 0.76