org.apache.tuscany.model.util
Class NotifyingList<E>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.ArrayList<E>
org.apache.tuscany.model.util.NotifyingList<E>
- All Implemented Interfaces:
- Serializable, Cloneable, Iterable<E>, Collection<E>, List<E>, RandomAccess
public abstract class NotifyingList<E>
- extends ArrayList<E>
A list that invokes added or removed methods when elements are added or removed.
- See Also:
- Serialized Form
Methods inherited from class java.util.ArrayList |
clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, removeRange, set, size, toArray, toArray, trimToSize |
NotifyingList
public NotifyingList()
freeze
public void freeze()
checkNotFrozen
protected void checkNotFrozen()
add
public boolean add(E element)
- Specified by:
add
in interface Collection<E>
- Specified by:
add
in interface List<E>
- Overrides:
add
in class ArrayList<E>
add
public void add(int index,
E element)
- Specified by:
add
in interface List<E>
- Overrides:
add
in class ArrayList<E>
addAll
public boolean addAll(Collection<? extends E> c)
- Specified by:
addAll
in interface Collection<E>
- Specified by:
addAll
in interface List<E>
- Overrides:
addAll
in class ArrayList<E>
addAll
public boolean addAll(int index,
Collection<? extends E> c)
- Specified by:
addAll
in interface List<E>
- Overrides:
addAll
in class ArrayList<E>
clear
public void clear()
- Specified by:
clear
in interface Collection<E>
- Specified by:
clear
in interface List<E>
- Overrides:
clear
in class ArrayList<E>
remove
public E remove(int index)
- Specified by:
remove
in interface List<E>
- Overrides:
remove
in class ArrayList<E>
remove
public boolean remove(Object element)
- Specified by:
remove
in interface Collection<E>
- Specified by:
remove
in interface List<E>
- Overrides:
remove
in class ArrayList<E>
removeAll
public boolean removeAll(Collection<?> c)
- Specified by:
removeAll
in interface Collection<E>
- Specified by:
removeAll
in interface List<E>
- Overrides:
removeAll
in class AbstractCollection<E>
added
protected abstract void added(E element)
removed
protected abstract void removed(E element)
-