edu.rice.cs.plt.collect
Class ComposedMap<K,X,V>
java.lang.Object
edu.rice.cs.plt.collect.AbstractKeyBasedMap<K,V>
edu.rice.cs.plt.collect.ComposedMap<K,X,V>
- All Implemented Interfaces:
- LambdaMap<K,V>, Lambda<K,V>, Composite, Serializable, Map<K,V>
public class ComposedMap<K,X,V>
- extends AbstractKeyBasedMap<K,V>
- implements Composite, Serializable
The transitive composition of two maps, lazily constructed and dynamically-updated. An entry
k=v
appears in the map if and only if there is an entry k=x
in the first map
and x=v
in the second.
- See Also:
- Serialized Form
Nested classes/interfaces inherited from interface java.util.Map |
Map.Entry<K,V> |
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 |
ComposedMap
public ComposedMap(Map<? extends K,? extends X> map1,
Map<? super X,? extends V> map2)
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>