net.infonode.util.collection.notifymap
Class ConstChangeNotifyVectorMap

java.lang.Object
  extended by net.infonode.util.collection.notifymap.AbstractConstChangeNotifyMap
      extended by net.infonode.util.collection.notifymap.ConstChangeNotifyVectorMap
All Implemented Interfaces:
ConstCollection, ConstMap, ConstChangeNotifyMap

public class ConstChangeNotifyVectorMap
extends AbstractConstChangeNotifyMap


Field Summary
private  java.util.ArrayList mapListeners
           
private  ConstVectorMap vectorMap
           
 
Constructor Summary
ConstChangeNotifyVectorMap()
           
 
Method Summary
 void addMap(ConstChangeNotifyMap map)
           
 void addMap(int index, ConstChangeNotifyMap map)
           
private  void addMapListener(int index)
           
 ConstMapIterator constIterator()
          Returns an iterator for this map.
 boolean containsKey(java.lang.Object key)
          Returns true if this map contains the key.
 boolean containsValue(java.lang.Object value)
          Returns true if this map contains the value.
protected  void firstListenerAdded()
           
 java.lang.Object get(java.lang.Object key)
          Returns the value associated with the key.
 ConstChangeNotifyMap getMap(int index)
           
 int getMapCount()
           
 int getMapIndex(ConstMap map)
           
private  java.lang.Object getValue(java.lang.Object key, int fromIndex, int toIndex)
           
 boolean isEmpty()
          Returns true if this collection is empty.
protected  void lastListenerRemoved()
           
 void removeMap(int index)
           
private  void removeMapListener(int index)
           
 
Methods inherited from class net.infonode.util.collection.notifymap.AbstractConstChangeNotifyMap
fireEntriesChanged, fireEntryChanged, fireEntryRemoved, getChangeSignal, getChangeSignalInternal, listenerAdded, listenerRemoved
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

vectorMap

private ConstVectorMap vectorMap

mapListeners

private java.util.ArrayList mapListeners
Constructor Detail

ConstChangeNotifyVectorMap

public ConstChangeNotifyVectorMap()
Method Detail

firstListenerAdded

protected void firstListenerAdded()
Overrides:
firstListenerAdded in class AbstractConstChangeNotifyMap

lastListenerRemoved

protected void lastListenerRemoved()
Overrides:
lastListenerRemoved in class AbstractConstChangeNotifyMap

getValue

private java.lang.Object getValue(java.lang.Object key,
                                  int fromIndex,
                                  int toIndex)

getMapIndex

public int getMapIndex(ConstMap map)

addMap

public void addMap(ConstChangeNotifyMap map)

addMap

public void addMap(int index,
                   ConstChangeNotifyMap map)

addMapListener

private void addMapListener(int index)

removeMapListener

private void removeMapListener(int index)

getMapCount

public int getMapCount()

removeMap

public void removeMap(int index)

get

public java.lang.Object get(java.lang.Object key)
Description copied from interface: ConstMap
Returns the value associated with the key.

Parameters:
key - the key
Returns:
the value associated with the key, null if no value is associated with the key

containsKey

public boolean containsKey(java.lang.Object key)
Description copied from interface: ConstMap
Returns true if this map contains the key.

Parameters:
key - the key
Returns:
true if this map contains the key

containsValue

public boolean containsValue(java.lang.Object value)
Description copied from interface: ConstMap
Returns true if this map contains the value.

Parameters:
value - the value
Returns:
true if this map contains the value

isEmpty

public boolean isEmpty()
Description copied from interface: ConstCollection
Returns true if this collection is empty.

Returns:
true if this collection is empty

getMap

public ConstChangeNotifyMap getMap(int index)

constIterator

public ConstMapIterator constIterator()
Description copied from interface: ConstMap
Returns an iterator for this map.

Returns:
an iterator for this map