|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.pf.util.MapWrapper
public class MapWrapper
This is a wrapper class that implements the java.util.Map interface
and contains an internal map. All method calls are routed directly to
the internal map.
Therefore it makes no sense to use this class directly. It is rather meant
to be the superclass for other map-wrapping classes that want to slightly
change the behaviour.
These subclasses only have to override those methods they really want to
change the behaviour of.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface java.util.Map |
|---|
java.util.Map.Entry<K,V> |
| Constructor Summary | |
|---|---|
MapWrapper()
Initialize the new instance with default values. |
|
MapWrapper(int initialCapacity)
Initialize the new instance with default values. |
|
MapWrapper(java.util.Map mapToBeWrapped)
Initialize the new instance with the given map |
|
| Method Summary | |
|---|---|
void |
clear()
Removes all entries from this map. |
boolean |
containsKey(java.lang.Object key)
This method returns true, if the given key can be found in this map. |
boolean |
containsValue(java.lang.Object value)
This method returns true, if the given value is a value of any entry in this map. |
java.util.Set |
entrySet()
Returns all entries of the map |
java.lang.Object |
get(java.lang.Object key)
Returns the object that was registered under the specified key. |
boolean |
isEmpty()
Returns true, if there is no entry in this map. |
java.util.Set |
keySet()
Returns all keys in this map. |
java.lang.Object |
put(java.lang.Object key,
java.lang.Object value)
Puts the given value under the specified key into the map. |
void |
putAll(java.util.Map map)
Each entry of the given map will be added. |
java.lang.Object |
remove(java.lang.Object key)
Removes the entry with the specified key. |
int |
size()
Returns how many entries currently are in this map. |
java.util.Collection |
values()
Returns all values of the map. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.util.Map |
|---|
equals, hashCode |
| Constructor Detail |
|---|
public MapWrapper()
public MapWrapper(int initialCapacity)
initialCapacity - Defines how many "slots" for elements are created initiallypublic MapWrapper(java.util.Map mapToBeWrapped)
| Method Detail |
|---|
public void clear()
clear in interface java.util.MapMap.clear()public boolean containsKey(java.lang.Object key)
containsKey in interface java.util.MapMap.containsKey(Object)public boolean containsValue(java.lang.Object value)
containsValue in interface java.util.MapMap.containsValue(Object)public java.util.Set entrySet()
entrySet in interface java.util.MapMap.entrySet()public java.lang.Object get(java.lang.Object key)
get in interface java.util.MapMap.get(Object)public boolean isEmpty()
isEmpty in interface java.util.MapMap.isEmpty()public java.util.Set keySet()
keySet in interface java.util.MapMap.keySet()
public java.lang.Object put(java.lang.Object key,
java.lang.Object value)
put in interface java.util.MapMap.put(Object, Object)public void putAll(java.util.Map map)
putAll in interface java.util.MapMap.putAll(Map)public java.lang.Object remove(java.lang.Object key)
remove in interface java.util.MapMap.remove(Object)public int size()
size in interface java.util.MapMap.size()public java.util.Collection values()
values in interface java.util.MapMap.values()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||