nl.tudelft.simulation.event.util
Class EventProducingMap

java.lang.Object
  extended by nl.tudelft.simulation.event.EventProducer
      extended by nl.tudelft.simulation.event.util.EventProducingMap
All Implemented Interfaces:
Serializable, Map, EventProducerInterface

public class EventProducingMap
extends EventProducer
implements Map

The Event producing map provides a map to which one can subscribe interest in entry changes. This class does not keep track of changes which take place indirectly. One is for example not notified on map.iterator.remove(). A listener must subscribe to the iterator, key set, etc. individually.

(c) copyright 2002-2005 Delft University of Technology , the Netherlands.

See for project information www.simulation.tudelft.nl/event
License of use: Lesser General Public License (LGPL) , no warranty

Since:
1.2
Version:
$Revision: 1.1 $ $Date: 2007/01/06 13:24:36 $
Author:
Peter Jacobs
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Field Summary
static EventType OBJECT_ADDED_EVENT
          OBJECT_ADDED_EVENT is fired on new entries
static EventType OBJECT_REMOVED_EVENT
          OBJECT_REMOVED_EVENT is fired on removel of entries
 
Fields inherited from class nl.tudelft.simulation.event.EventProducer
listeners
 
Fields inherited from interface nl.tudelft.simulation.event.EventProducerInterface
FIRST_POSITION, LAST_POSITION
 
Constructor Summary
EventProducingMap(Map parent)
          constructs a new EventProducingMap.
 
Method Summary
 void clear()
           
 boolean containsKey(Object arg0)
           
 boolean containsValue(Object arg0)
           
 Set entrySet()
           
 Object get(Object arg0)
           
 boolean isEmpty()
           
 Set keySet()
           
 Object put(Object arg0, Object arg1)
           
 void putAll(Map arg0)
           
 Object remove(Object arg0)
           
 int size()
           
 Collection values()
           
 
Methods inherited from class nl.tudelft.simulation.event.EventProducer
addListener, addListener, addListener, addListener, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, getEventTypes, removeAllListeners, removeAllListeners, removeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Field Detail

OBJECT_ADDED_EVENT

public static final EventType OBJECT_ADDED_EVENT
OBJECT_ADDED_EVENT is fired on new entries


OBJECT_REMOVED_EVENT

public static final EventType OBJECT_REMOVED_EVENT
OBJECT_REMOVED_EVENT is fired on removel of entries

Constructor Detail

EventProducingMap

public EventProducingMap(Map parent)
constructs a new EventProducingMap.

Parameters:
parent - the parent map.
Method Detail

size

public int size()
Specified by:
size in interface Map
See Also:
Map.size()

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface Map
See Also:
Map.isEmpty()

containsKey

public boolean containsKey(Object arg0)
Specified by:
containsKey in interface Map
See Also:
Map.containsKey(java.lang.Object)

containsValue

public boolean containsValue(Object arg0)
Specified by:
containsValue in interface Map
See Also:
Map.containsValue(java.lang.Object)

get

public Object get(Object arg0)
Specified by:
get in interface Map
See Also:
Map.get(java.lang.Object)

put

public Object put(Object arg0,
                  Object arg1)
Specified by:
put in interface Map
See Also:
Map.put(java.lang.Object, java.lang.Object)

remove

public Object remove(Object arg0)
Specified by:
remove in interface Map
See Also:
Map.remove(java.lang.Object)

putAll

public void putAll(Map arg0)
Specified by:
putAll in interface Map
See Also:
Map.putAll(java.util.Map)

clear

public void clear()
Specified by:
clear in interface Map
See Also:
Map.clear()

keySet

public Set keySet()
Specified by:
keySet in interface Map
See Also:
Map.keySet()

values

public Collection values()
Specified by:
values in interface Map
See Also:
Map.values()

entrySet

public Set entrySet()
Specified by:
entrySet in interface Map
See Also:
Map.entrySet()


Copyright © 2002-2011 Delft University of Technology, the Netherlands. All Rights Reserved.