dsto.dfc.collections
Class BasicMonitoredMap

java.lang.Object
  extended by dsto.dfc.collections.BasicCollectionEventSource
      extended by dsto.dfc.collections.BasicMonitoredMap
All Implemented Interfaces:
MonitoredMap, Serializable, Map
Direct Known Subclasses:
MapDataObject

public class BasicMonitoredMap
extends BasicCollectionEventSource
implements MonitoredMap

An implementation of a MonitoredMap, wrapping a backing Map instance.

NOTE: modifying entrySet (), values () and keys () does not currently fire collection events: only the "top-level" modifiers such as put (), get (), remove (), etc are monitored.

Version:
$Revision$
Author:
Matthew Phillips
See Also:
Serialized Form

Nested Class Summary
protected  class BasicMonitoredMap.MyEntry
           
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Field Summary
protected  Map backingMap
           
 
Constructor Summary
BasicMonitoredMap()
           
BasicMonitoredMap(Map backingMap)
           
 
Method Summary
 void clear()
           
 Object clone()
           
 boolean containsKey(Object key)
           
 boolean containsValue(Object value)
           
protected  BasicMonitoredMap emptyClone()
          Make an empty clone of this collection (ie a copy with none of the original elements).
 Set entrySet()
           
 Object get(Object key)
           
 boolean isEmpty()
           
 Set keySet()
           
 Object put(Object key, Object value)
           
 void putAll(Map t)
           
 Object remove(Object key)
           
 int size()
           
 Collection values()
           
 
Methods inherited from class dsto.dfc.collections.BasicCollectionEventSource
addCollectionListener, fireElementAdded, fireElementAdded, fireElementRemoved, fireElementRemoved, fireElementsAdded, fireElementsAdded, fireElementsAdded, fireElementsRemoved, fireElementsRemoved, fireElementsRemoved, removeCollectionListener
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface dsto.dfc.collections.MonitoredMap
addCollectionListener, removeCollectionListener
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Field Detail

backingMap

protected Map backingMap
Constructor Detail

BasicMonitoredMap

public BasicMonitoredMap()

BasicMonitoredMap

public BasicMonitoredMap(Map backingMap)
Method Detail

clone

public Object clone()
             throws CloneNotSupportedException
Overrides:
clone in class BasicCollectionEventSource
Throws:
CloneNotSupportedException

emptyClone

protected BasicMonitoredMap emptyClone()
                                throws CloneNotSupportedException
Make an empty clone of this collection (ie a copy with none of the original elements).

Throws:
CloneNotSupportedException

size

public int size()
Specified by:
size in interface Map

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface Map

containsKey

public boolean containsKey(Object key)
Specified by:
containsKey in interface Map

containsValue

public boolean containsValue(Object value)
Specified by:
containsValue in interface Map

get

public Object get(Object key)
Specified by:
get in interface Map

put

public Object put(Object key,
                  Object value)
Specified by:
put in interface Map

remove

public Object remove(Object key)
Specified by:
remove in interface Map

putAll

public void putAll(Map t)
Specified by:
putAll in interface Map

clear

public void clear()
Specified by:
clear in interface Map

keySet

public Set keySet()
Specified by:
keySet in interface Map

values

public Collection values()
Specified by:
values in interface Map

entrySet

public Set entrySet()
Specified by:
entrySet in interface Map


Copyright © 2008 Commonwealth of Australia