jef.dna.util
Class NotifyingList<E>

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.ArrayList<E>
              extended by jef.dna.util.NotifyingList<E>
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<E>, java.util.Collection<E>, java.util.List<E>, java.util.RandomAccess

public class NotifyingList<E>
extends java.util.ArrayList<E>
implements java.util.List<E>

Author:
Francesco Russo (frusso@dev.java.net)
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
NotifyingList(ChangeListener lsnr)
          Creates a new instance of NotifyingList
 
Method Summary
 boolean add(E el)
           
 void add(int i, E el)
           
 boolean addAll(java.util.Collection<? extends E> els)
           
 boolean addAll(int i, java.util.Collection<? extends E> els)
           
 java.lang.Object clone()
           
 ChangeListener getListener()
           
 E remove(int i)
           
 boolean remove(java.lang.Object el)
           
 boolean removeAll(java.util.Collection<?> els)
           
 E set(int i, E el)
           
 void setListener(ChangeListener l)
           
 
Methods inherited from class java.util.ArrayList
clear, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, removeRange, 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, retainAll, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, retainAll, size, subList, toArray, toArray
 

Constructor Detail

NotifyingList

public NotifyingList(ChangeListener lsnr)
Creates a new instance of NotifyingList

Method Detail

setListener

public void setListener(ChangeListener l)

getListener

public ChangeListener getListener()

add

public boolean add(E el)
Specified by:
add in interface java.util.Collection<E>
Specified by:
add in interface java.util.List<E>
Overrides:
add in class java.util.ArrayList<E>

add

public void add(int i,
                E el)
Specified by:
add in interface java.util.List<E>
Overrides:
add in class java.util.ArrayList<E>

addAll

public boolean addAll(java.util.Collection<? extends E> els)
Specified by:
addAll in interface java.util.Collection<E>
Specified by:
addAll in interface java.util.List<E>
Overrides:
addAll in class java.util.ArrayList<E>

addAll

public boolean addAll(int i,
                      java.util.Collection<? extends E> els)
Specified by:
addAll in interface java.util.List<E>
Overrides:
addAll in class java.util.ArrayList<E>

remove

public E remove(int i)
Specified by:
remove in interface java.util.List<E>
Overrides:
remove in class java.util.ArrayList<E>

remove

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

removeAll

public boolean removeAll(java.util.Collection<?> els)
Specified by:
removeAll in interface java.util.Collection<E>
Specified by:
removeAll in interface java.util.List<E>
Overrides:
removeAll in class java.util.AbstractCollection<E>

set

public E set(int i,
             E el)
Specified by:
set in interface java.util.List<E>
Overrides:
set in class java.util.ArrayList<E>

clone

public java.lang.Object clone()
Overrides:
clone in class java.util.ArrayList<E>