Package org.omegat.util
Class MultiMap<K,V>
java.lang.Object
org.omegat.util.MultiMap<K,V>
A map that maps keys to sets of values. Does NOT allow null keys/values.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancontainsKey(K key) Returns true if this map contains a mapping for the specified key.booleancontainsPair(K key, V value) Returns true if this map maps the specified key to the specified value.voidAssociates the specified value with the specified key in this multi-map.voidRemoves all the mappings for this key from this map if it is present.
-
Constructor Details
-
MultiMap
public MultiMap()Creates an empty MultiMap.
-
-
Method Details
-
containsKey
Returns true if this map contains a mapping for the specified key. -
containsPair
Returns true if this map maps the specified key to the specified value. -
put
Associates the specified value with the specified key in this multi-map. Unlike normal Map, if the map previously contained a mapping for this key, the new value is appended to the list of the values mapped from this key. -
remove
Removes all the mappings for this key from this map if it is present.
-