Package org.apache.calcite.runtime
Class SortedMultiMap<K,V>
java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap<K,List<V>>
org.apache.calcite.runtime.SortedMultiMap<K,V>
- Type Parameters:
K
- Key typeV
- Value type
- All Implemented Interfaces:
Serializable
,Cloneable
,Map<K,
List<V>>
Map that allows you to partition values into lists according to a common
key, and then convert those lists into an iterator of sorted arrays.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,
V>, AbstractMap.SimpleImmutableEntry<K, V> -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionarrays
(Comparator<V> comparator) void
static <V> Iterator<V[]>
singletonArrayIterator
(Comparator<V> comparator, List<V> list) Shortcut method if the partition key is empty.Methods inherited from class java.util.HashMap
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, newHashMap, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
-
Constructor Details
-
SortedMultiMap
public SortedMultiMap()
-
-
Method Details
-
putMulti
-
arrays
-
singletonArrayIterator
Shortcut method if the partition key is empty. We know that we would end up with a map with just one entry, so save ourselves the trouble of all that hashing.
-