org.apache.geronimo.gbean
Class ReferenceMap

java.lang.Object
  extended by org.apache.geronimo.gbean.ReferenceMap
All Implemented Interfaces:
EventListener, Map, ReferenceCollectionListener

public class ReferenceMap
extends Object
implements Map, ReferenceCollectionListener


Nested Class Summary
static interface ReferenceMap.Key
           
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry
 
Constructor Summary
ReferenceMap(Collection collection, Map map, ReferenceMap.Key key)
          Constructs the ReferenceMap using a new instance of HashMap as the internal map.
ReferenceMap(Collection collection, ReferenceMap.Key key)
          Constructs the ReferenceMap using a new instance of HashMap as the internal map.
 
Method Summary
 void clear()
           
 boolean containsKey(Object key)
           
 boolean containsValue(Object value)
           
 Set entrySet()
           
 boolean equals(Object o)
           
 Object get(Object key)
           
 int hashCode()
           
 boolean isEmpty()
           
 Set keySet()
           
 void memberAdded(ReferenceCollectionEvent event)
           
 void memberRemoved(ReferenceCollectionEvent event)
           
 Object put(Object key, Object value)
           
 void putAll(Map t)
           
 Object remove(Object key)
           
 int size()
           
 Collection values()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReferenceMap

public ReferenceMap(Collection collection,
                    Map map,
                    ReferenceMap.Key key)
Constructs the ReferenceMap using a new instance of HashMap as the internal map.

Parameters:
collection - Must be an instance of ReferenceCollection
map - The map instance to which references will be added/removed
key -

ReferenceMap

public ReferenceMap(Collection collection,
                    ReferenceMap.Key key)
Constructs the ReferenceMap using a new instance of HashMap as the internal map.

Parameters:
collection - Must be an instance of ReferenceCollection
key -
Method Detail

memberAdded

public void memberAdded(ReferenceCollectionEvent event)
Specified by:
memberAdded in interface ReferenceCollectionListener

memberRemoved

public void memberRemoved(ReferenceCollectionEvent event)
Specified by:
memberRemoved in interface ReferenceCollectionListener

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

equals

public boolean equals(Object o)
Specified by:
equals in interface Map
Overrides:
equals in class Object

hashCode

public int hashCode()
Specified by:
hashCode in interface Map
Overrides:
hashCode in class Object


Copyright © 2006 Apache Software Foundation. All Rights Reserved.