edu.rice.cs.plt.collect
Class UnionMap<K,V>
java.lang.Object
edu.rice.cs.plt.collect.AbstractKeyBasedMap<K,V>
edu.rice.cs.plt.collect.UnionMap<K,V>
- All Implemented Interfaces:
- LambdaMap<K,V>, Lambda<K,V>, Composite, Serializable, Map<K,V>
public class UnionMap<K,V>
- extends AbstractKeyBasedMap<K,V>
- implements Composite, Serializable
A lazily-constructed and dynamically-updated union of two maps. The first is designated
the parent, and the second the child. Bindings for keys in the child shadow
those in the parent.
- See Also:
- Serialized Form
| Nested classes/interfaces inherited from interface java.util.Map |
Map.Entry<K,V> |
|
Constructor Summary |
UnionMap(Map<? extends K,? extends V> parent,
Map<? extends K,? extends V> child)
|
| Methods inherited from class edu.rice.cs.plt.collect.AbstractKeyBasedMap |
clear, containsKey, containsValue, entrySet, equals, hashCode, isEmpty, mapEntryForKey, put, putAll, remove, size, toString, value, values |
UnionMap
public UnionMap(Map<? extends K,? extends V> parent,
Map<? extends K,? extends V> child)
compositeHeight
public int compositeHeight()
- Description copied from interface:
Composite
- Get the maximum path length from this node to a leaf.
- Specified by:
compositeHeight in interface Composite
compositeSize
public int compositeSize()
- Description copied from interface:
Composite
- Get the number of nodes in the tree rooted at this node. Always 1 or greater.
- Specified by:
compositeSize in interface Composite
get
public V get(Object key)
- Specified by:
get in interface Map<K,V>- Specified by:
get in class AbstractKeyBasedMap<K,V>
keySet
public PredicateSet<K> keySet()
- Specified by:
keySet in interface LambdaMap<K,V>- Specified by:
keySet in interface Map<K,V>- Specified by:
keySet in class AbstractKeyBasedMap<K,V>