Package org.opencms.util
Class CmsManyToOneMap<K,V>
java.lang.Object
org.opencms.util.CmsManyToOneMap<K,V>
- Type Parameters:
K
- the key typeV
- the value type
Special collection class which allows lookup from keys to values and from values to sets of keys.
It also implements efficient removal of values, not just keys.
-
Constructor Summary
ConstructorDescriptionCreates a new instance.CmsManyToOneMap
(CmsManyToOneMap<K, V> other) Creates a new instance by copying the data from another one. -
Method Summary
-
Constructor Details
-
CmsManyToOneMap
public CmsManyToOneMap()Creates a new instance. -
CmsManyToOneMap
Creates a new instance by copying the data from another one.- Parameters:
other
- the other map to copy the data from
-
-
Method Details
-
get
Gets the value for a key.- Parameters:
key
- the key- Returns:
- the value for the key, or null
-
put
Associates a value with a key.- Parameters:
key
- the keyvalue
- the value
-
remove
Removes the entry with the given key.- Parameters:
key
- the key
-
removeValue
Removes all entries with the given value.- Parameters:
value
- the value
-