imx.lib.listener
Class ActiveArrayList

java.lang.Object
  extended by java.util.AbstractCollection
      extended by java.util.AbstractList
          extended by java.util.ArrayList
              extended by imx.lib.listener.ActiveArrayList
All Implemented Interfaces:
ActiveCollection, ActiveInterface, java.io.Serializable, java.lang.Cloneable, java.lang.Iterable, java.util.Collection, java.util.List, java.util.RandomAccess

public class ActiveArrayList
extends java.util.ArrayList
implements java.io.Serializable, ActiveCollection

This ArrayList updates all registered ListenerInterfaces, when the list data is modified. CAUTION: not all methods are implemented!!!

See Also:
Serialized Form

Constructor Summary
ActiveArrayList()
           
ActiveArrayList(java.lang.String name)
          If you want to set a unique identifier to be used in the logs for this object, define it with the parameter name.
 
Method Summary
 boolean add(java.lang.Object o)
           
 boolean addAll(java.util.Collection collection)
           
 void addListener(ListenerInterface listener, java.lang.Object eventType)
          Registers a listener, that is notified when the list was modified.
 void clear()
           
 boolean remove(java.lang.Object o)
           
 void removeListener(ListenerInterface listener, java.lang.Object eventType)
          Removes a listener from the change notification list.
 void updateListener()
          Notifies all listener, that this list has changed.
 
Methods inherited from class java.util.ArrayList
add, addAll, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, set, size, toArray, toArray, trimToSize
 
Methods inherited from class java.util.AbstractList
equals, hashCode, iterator, listIterator, listIterator, subList
 
Methods inherited from class java.util.AbstractCollection
containsAll, removeAll, retainAll, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Collection
contains, containsAll, equals, hashCode, isEmpty, iterator, removeAll, retainAll, size, toArray, toArray
 
Methods inherited from interface java.util.List
containsAll, equals, hashCode, iterator, listIterator, listIterator, removeAll, retainAll, subList
 

Constructor Detail

ActiveArrayList

public ActiveArrayList(java.lang.String name)
If you want to set a unique identifier to be used in the logs for this object, define it with the parameter name.


ActiveArrayList

public ActiveArrayList()
Method Detail

add

public boolean add(java.lang.Object o)
Specified by:
add in interface java.util.Collection
Specified by:
add in interface java.util.List
Overrides:
add in class java.util.ArrayList

remove

public boolean remove(java.lang.Object o)
Specified by:
remove in interface java.util.Collection
Specified by:
remove in interface java.util.List
Overrides:
remove in class java.util.ArrayList

clear

public void clear()
Specified by:
clear in interface java.util.Collection
Specified by:
clear in interface java.util.List
Overrides:
clear in class java.util.ArrayList

addAll

public boolean addAll(java.util.Collection collection)
Specified by:
addAll in interface java.util.Collection
Specified by:
addAll in interface java.util.List
Overrides:
addAll in class java.util.ArrayList

addListener

public void addListener(ListenerInterface listener,
                        java.lang.Object eventType)
Registers a listener, that is notified when the list was modified.

Specified by:
addListener in interface ActiveInterface
Parameters:
eventType - should be null, but does not matter
listener - must not be null
See Also:
ActiveInterface

removeListener

public void removeListener(ListenerInterface listener,
                           java.lang.Object eventType)
Removes a listener from the change notification list.

Specified by:
removeListener in interface ActiveInterface
Parameters:
eventType - should be null, but does not matter
listener - must not be null
See Also:
ActiveInterface

updateListener

public void updateListener()
Notifies all listener, that this list has changed. The update command is this.