Class CompositeMap<K,V>
java.lang.Object
org.cyclops.cyclopscore.datastructure.CompositeMap<K,V>
- All Implemented Interfaces:
Map<K,
V>
Provides a composite read-only view on a collection of maps.
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addElement
(Map<K, V> element) Add a new map to the composition.void
clear()
boolean
containsKey
(Object key) boolean
containsValue
(Object value) entrySet()
boolean
isEmpty()
keySet()
void
boolean
removeElement
(Map<K, V> element) Remove the given map from the composition.void
Clear all current elements in the composition.int
size()
values()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Constructor Details
-
CompositeMap
public CompositeMap()
-
-
Method Details
-
addElement
Add a new map to the composition.- Parameters:
element
- The map to add.
-
removeElement
Remove the given map from the composition.- Parameters:
element
- The map to remove.- Returns:
- If the map was removed, and thus already existed in the composition.
-
resetElements
public void resetElements()Clear all current elements in the composition. -
size
public int size() -
isEmpty
public boolean isEmpty() -
containsKey
- Specified by:
containsKey
in interfaceMap<K,
V>
-
containsValue
- Specified by:
containsValue
in interfaceMap<K,
V>
-
get
-
put
-
remove
-
putAll
-
clear
public void clear() -
keySet
-
values
-
entrySet
-