Class MapWrapper<T,E>
- java.lang.Object
-
- jadex.commons.collection.wrappers.MapWrapper<T,E>
-
- All Implemented Interfaces:
java.util.Map<T,E>
- Direct Known Subclasses:
MapWrapper
public abstract class MapWrapper<T,E> extends java.lang.Object implements java.util.Map<T,E>Wrap a map and call template methods on modification.
-
-
Constructor Summary
Constructors Constructor Description MapWrapper(java.util.Map<T,E> delegate)Create a new collection wrapper.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidclear()booleancontainsKey(java.lang.Object key)booleancontainsValue(java.lang.Object value)protected voidentriesAdded(java.util.Set<java.util.Map.Entry<T,E>> entries)Entries were added to the map.protected voidentriesRemoved(java.util.Set<java.util.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.java.util.Set<java.util.Map.Entry<T,E>>entrySet()booleanequals(java.lang.Object obj)Test if this object equals another.Eget(java.lang.Object key)inthashCode()Get the hashcode of the object.booleanisEmpty()java.util.Set<T>keySet()Eput(T key, E value)voidputAll(java.util.Map<? extends T,? extends E> m)Eremove(java.lang.Object key)intsize()java.lang.StringtoString()Get the string representation.java.util.Collection<E>values()
-
-
-
Method Detail
-
containsKey
public boolean containsKey(java.lang.Object key)
-
containsValue
public boolean containsValue(java.lang.Object value)
-
values
public java.util.Collection<E> values()
-
hashCode
public int hashCode()
Get the hashcode of the object.
-
equals
public boolean equals(java.lang.Object obj)
Test if this object equals another.
-
toString
public java.lang.String toString()
Get the string representation.- Overrides:
toStringin classjava.lang.Object- Returns:
- The string representation.
-
entryRemoved
protected abstract void entryRemoved(T key, E value)
An entry was removed from the map.
-
entryChanged
protected abstract void entryChanged(T key, E oldvalue, E newvalue)
An entry was changed in the map.
-
entriesAdded
protected void entriesAdded(java.util.Set<java.util.Map.Entry<T,E>> entries)
Entries were added to the map.
-
-