edu.stanford.nlp.util

## Class TwoDimensionalMap<K1,K2,V>

• ### Constructor Detail

• #### TwoDimensionalMap

public TwoDimensionalMap()
• ### Method Detail

• #### size

public int size()
• #### isEmpty

public boolean isEmpty()
• #### put

public V put(K1 key1,
K2 key2,
V value)
• #### put

public void put(K1 key1)
• #### contains

public boolean contains(K1 key1,
K2 key2)
• #### get

public V get(K1 key1,
K2 key2)
• #### remove

public V remove(K1 key1,
K2 key2)
• #### remove

public void remove(K1 key1)
Removes all of the data associated with the first key in the map
• #### clear

public void clear()
• #### containsKey

public boolean containsKey(K1 key1)
• #### get

public Map<K2,V> get(K1 key1)
• #### getMap

public Map<K2,V> getMap(K1 key1)
• #### values

public Collection<V> values()
• #### firstKeySet

public Set<K1> firstKeySet()
• #### secondKeySet

public Set<K2> secondKeySet()
• #### addAll

public <V2> void addAll(TwoDimensionalMap<? extends K1,? extends K2,? extends V2> other,
Function<V2,V> function)
Adds all of the entries in the other map, performing function on them to transform the values
• #### replaceAll

public void replaceAll(Function<V,? extends V> f)
Replace each of the elements with the application of a function. TODO: use a TriFunction? Such a thing does not exist
• #### hashMap

public static <K1,K2,V> TwoDimensionalMap<K1,K2,V> hashMap()
• #### treeMap

public static <K1,K2,V> TwoDimensionalMap<K1,K2,V> treeMap()
• #### identityHashMap

public static <K1,K2,V> TwoDimensionalMap<K1,K2,V> identityHashMap()
• #### equals

public boolean equals(Object o)
Overrides:
equals in class Object
• #### hashCode

public int hashCode()
Overrides:
hashCode in class Object
• #### valueIterator

public Iterator<V> valueIterator()

Stanford NLP Group