Package jadex.collection
Class MapWrapper<T,E>
java.lang.Object
jadex.collection.MapWrapper<T,E>
- All Implemented Interfaces:
Map<T,E>
Wrap a map and call template methods on modification.
-
Nested Class Summary
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()booleancontainsKey(Object key) booleancontainsValue(Object value) protected voidentriesAdded(Set<Map.Entry<T, E>> entries) Entries were added to the map.protected voidentriesRemoved(Set<Map.Entry<T, E>> entries) Entries were removed from the map.protected abstract voidentryAdded(T key, E value) An entry was added to the map.protected abstract voidentryChanged(T key, E oldvalue, E newvalue) An entry was changed in the map.protected abstract voidentryRemoved(T key, E value) An entry was removed from the map.entrySet()booleanTest if this object equals another.inthashCode()Get the hashcode of the object.booleanisEmpty()keySet()voidintsize()toString()Get the string representation.values()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Field Details
-
delegate
The delegate map.
-
-
Constructor Details
-
MapWrapper
Create a new collection wrapper.
-
-
Method Details
-
size
public int size() -
isEmpty
public boolean isEmpty() -
containsKey
- Specified by:
containsKeyin interfaceMap<T,E>
-
containsValue
- Specified by:
containsValuein interfaceMap<T,E>
-
get
-
put
-
remove
-
putAll
-
clear
public void clear() -
keySet
-
values
-
entrySet
-
hashCode
public int hashCode()Get the hashcode of the object. -
equals
Test if this object equals another. -
toString
Get the string representation. -
entryAdded
An entry was added to the map. -
entryRemoved
An entry was removed from the map. -
entryChanged
An entry was changed in the map. -
entriesAdded
Entries were added to the map. -
entriesRemoved
Entries were removed from the map.
-