Package org.apache.calcite.util
Class CompositeMap<K,V>
- java.lang.Object
-
- org.apache.calcite.util.CompositeMap<K,V>
-
- Type Parameters:
K
- Key typeV
- Value type
- All Implemented Interfaces:
java.util.Map<K,V>
public class CompositeMap<K,V> extends java.lang.Object implements java.util.Map<K,V>
Unmodifiable view onto multiple backing maps. An element occurs in the map if it occurs in any of the backing maps; the value is the value that occurs in the first map that contains the key.
-
-
Constructor Summary
Constructors Constructor Description CompositeMap(com.google.common.collect.ImmutableList<java.util.Map<K,V>> maps)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
private java.util.Map<K,V>
combinedMap()
boolean
containsKey(java.lang.Object key)
boolean
containsValue(java.lang.Object value)
java.util.Set<java.util.Map.Entry<K,V>>
entrySet()
V
get(java.lang.Object key)
boolean
isEmpty()
java.util.Set<K>
keySet()
private static <E> com.google.common.collect.ImmutableList<E>
list(E e, E[] es)
static <K,V>
CompositeMap<K,V>of(java.util.Map<K,V> map0, java.util.Map<K,V>... maps)
Creates a CompositeMap.V
put(K key, V value)
void
putAll(java.util.Map<? extends K,? extends V> m)
V
remove(java.lang.Object key)
int
size()
java.util.Collection<V>
values()
-
-
-
Method Detail
-
of
@SafeVarargs public static <K,V> CompositeMap<K,V> of(java.util.Map<K,V> map0, java.util.Map<K,V>... maps)
Creates a CompositeMap.
-
list
private static <E> com.google.common.collect.ImmutableList<E> list(E e, E[] es)
-
containsKey
public boolean containsKey(java.lang.Object key)
-
containsValue
public boolean containsValue(java.lang.Object value)
-
values
public java.util.Collection<V> values()
-
-