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 TypeMethodDescriptionvoid
clear()
boolean
containsKey
(Object key) boolean
containsValue
(Object value) protected void
entriesAdded
(Set<Map.Entry<T, E>> entries) Entries were added to the map.protected void
entriesRemoved
(Set<Map.Entry<T, E>> entries) Entries were removed from the map.protected abstract void
entryAdded
(T key, E value) An entry was added to the map.protected abstract void
entryChanged
(T key, E oldvalue, E newvalue) An entry was changed in the map.protected abstract void
entryRemoved
(T key, E value) An entry was removed from the map.entrySet()
boolean
Test if this object equals another.int
hashCode()
Get the hashcode of the object.boolean
isEmpty()
keySet()
void
int
size()
toString()
Get the string representation.values()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods 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:
containsKey
in interfaceMap<T,
E>
-
containsValue
- Specified by:
containsValue
in 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.
-