Package jmri.jmrit.logixng.util
Class DuplicateKeyMap<K,V>
java.lang.Object
jmri.jmrit.logixng.util.DuplicateKeyMap<K,V>
- All Implemented Interfaces:
Map<K,V>
A map that may contain multiple items with same key
-
Nested Class Summary
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()booleancontainsKey(Object key) booleancontainsValue(Object value) entrySet()Get all items in the map that has the key 'key'booleanisEmpty()keySet()voidbooleanvoidremoveValue(K key, V value) Remove a value.intsize()values()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, replace, replace, replaceAll
-
Field Details
-
_internalMap
Map<K,List<V>> _internalMap
-
-
Constructor Details
-
DuplicateKeyMap
public DuplicateKeyMap()
-
-
Method Details
-
size
-
isEmpty
-
containsKey
- Specified by:
containsKeyin interfaceMap<K,V>
-
containsValue
- Specified by:
containsValuein interfaceMap<K,V>
-
get
-
getAll
Get all items in the map that has the key 'key'- Parameters:
key- the key whose associated values is to be returned- Returns:
- an unmodifiable list of all the items
-
put
-
putAll
-
remove
-
remove
-
removeValue
Remove a value.- Parameters:
key- the keyvalue- the value
-
clear
-
keySet
-
values
-
entrySet
-