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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddElement(Map<K, V> element) Add a new map to the composition.voidclear()booleancontainsKey(Object key) booleancontainsValue(Object value) entrySet()booleanisEmpty()keySet()voidbooleanremoveElement(Map<K, V> element) Remove the given map from the composition.voidClear all current elements in the composition.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, 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:
containsKeyin interfaceMap<K,V>
-
containsValue
- Specified by:
containsValuein interfaceMap<K,V>
-
get
-
put
-
remove
-
putAll
-
clear
public void clear() -
keySet
-
values
-
entrySet
-