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 void
clear()
boolean
containsKey(java.lang.Object key)
boolean
containsValue(java.lang.Object value)
protected void
entriesAdded(java.util.Set<java.util.Map.Entry<T,E>> entries)
Entries were added to the map.protected void
entriesRemoved(java.util.Set<java.util.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.java.util.Set<java.util.Map.Entry<T,E>>
entrySet()
boolean
equals(java.lang.Object obj)
Test if this object equals another.E
get(java.lang.Object key)
int
hashCode()
Get the hashcode of the object.boolean
isEmpty()
java.util.Set<T>
keySet()
E
put(T key, E value)
void
putAll(java.util.Map<? extends T,? extends E> m)
E
remove(java.lang.Object key)
int
size()
java.lang.String
toString()
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:
toString
in 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.
-
-