|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.dishevelled.observable.AbstractCollectionDecorator<E>
org.dishevelled.observable.AbstractObservableCollection<E>
E - collection element typepublic abstract class AbstractObservableCollection<E>
Abstract implementation of an observable collection
that decorates an instance of Collection.
| Constructor Summary | |
|---|---|
protected |
AbstractObservableCollection(Collection<E> collection)
Create a new abstract observable collection that decorates the specified collection. |
| Method Summary | |
|---|---|
boolean |
add(E e)
|
boolean |
addAll(Collection<? extends E> coll)
|
void |
addCollectionChangeListener(CollectionChangeListener<E> l)
Add the specified collection change listener. |
void |
addVetoableCollectionChangeListener(VetoableCollectionChangeListener<E> l)
Add the specified vetoable collection change listener. |
void |
clear()
|
void |
fireCollectionChanged()
Fire a change event to all registered CollectionChangeListeners. |
void |
fireCollectionChanged(CollectionChangeEvent<E> e)
Fire the specified change event to all registered CollectionChangeListeners. |
void |
fireCollectionWillChange()
Fire a will change event to all registered VetoableCollectionChangeListeners. |
void |
fireCollectionWillChange(VetoableCollectionChangeEvent<E> e)
Fire the specified will change event to all registered VetoableCollectionChangeListeners. |
int |
getCollectionChangeListenerCount()
Return the number of CollectionChangeListeners registered
to this observable collection. |
CollectionChangeListener<E>[] |
getCollectionChangeListeners()
Return an array of all CollectionChangeListeners, or
an empty array if none are registered. |
protected ObservableCollectionChangeSupport<E> |
getObservableCollectionChangeSupport()
Return the ObservableCollectionChangeSupport
class backing this abstract observable collection. |
int |
getVetoableCollectionChangeListenerCount()
Return the number of VetoableCollectionChangeListeners
registered to this observable collection. |
VetoableCollectionChangeListener<E>[] |
getVetoableCollectionChangeListeners()
Return an array of all VetoableCollectionChangeListeners,
or an empty array if none are registered. |
Iterator<E> |
iterator()
|
protected abstract void |
postAdd(E e)
Notify subclasses the add method has just been
called on the wrapped collection with the specified parameter. |
protected abstract void |
postAddAll(Collection<? extends E> coll)
Notify subclasses the addAll method has just been
called on the wrapped collection with the specified parameter. |
protected abstract void |
postClear()
Notify subclasses the clear method has just been
called on the wrapped collection. |
protected abstract void |
postIteratorRemove()
Notify subclasses the remove method has just been
called on the wrapped collection's iterator. |
protected abstract void |
postRemove(Object o)
Notify subclasses the remove method has just been
called on the wrapped collection with the specified parameter. |
protected abstract void |
postRemoveAll(Collection<?> coll)
Notify subclasses the removeAll method has just been
called on the wrapped collection with the specified parameter. |
protected abstract void |
postRetainAll(Collection<?> coll)
Notify subclasses the retainAll method has just been
called on the wrapped collection with the specified parameter. |
protected abstract boolean |
preAdd(E e)
Notify subclasses the add method is about to
be called on the wrapped collection with the specified parameter. |
protected abstract boolean |
preAddAll(Collection<? extends E> coll)
Notify subclasses the addAll method is about to
be called on the wrapped collection with the specified parameter. |
protected abstract boolean |
preClear()
Notify subclasses the clear method is about to
be called on the wrapped collection. |
protected abstract boolean |
preIteratorRemove()
Notify subclasses the remove method is about to
be called on the wrapped collection's iterator. |
protected abstract boolean |
preRemove(Object o)
Notify subclasses the remove method is about to
be called on the wrapped collection with the specified parameter. |
protected abstract boolean |
preRemoveAll(Collection<?> coll)
Notify subclasses the removeAll method is about to
be called on the wrapped collection with the specified parameter. |
protected abstract boolean |
preRetainAll(Collection<?> coll)
Notify subclasses the retainAll method is about to
be called on the wrapped collection with the specified parameter. |
boolean |
remove(Object o)
|
boolean |
removeAll(Collection<?> coll)
|
void |
removeCollectionChangeListener(CollectionChangeListener<E> l)
Remove the specified collection change listener. |
void |
removeVetoableCollectionChangeListener(VetoableCollectionChangeListener<E> l)
Remove the specified vetoable collection change listener. |
boolean |
retainAll(Collection<?> coll)
|
| Methods inherited from class org.dishevelled.observable.AbstractCollectionDecorator |
|---|
contains, containsAll, equals, getCollection, hashCode, isEmpty, size, toArray, toArray |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.util.Collection |
|---|
contains, containsAll, equals, hashCode, isEmpty, size, toArray, toArray |
| Constructor Detail |
|---|
protected AbstractObservableCollection(Collection<E> collection)
collection - collection to decorate| Method Detail |
|---|
protected final ObservableCollectionChangeSupport<E> getObservableCollectionChangeSupport()
ObservableCollectionChangeSupport
class backing this abstract observable collection.
ObservableCollectionChangeSupport
class backing this abstract observable collectionpublic final void addCollectionChangeListener(CollectionChangeListener<E> l)
addCollectionChangeListener in interface ObservableCollection<E>l - collection change listener to addpublic final void removeCollectionChangeListener(CollectionChangeListener<E> l)
removeCollectionChangeListener in interface ObservableCollection<E>l - collection change listener to removepublic final void addVetoableCollectionChangeListener(VetoableCollectionChangeListener<E> l)
addVetoableCollectionChangeListener in interface ObservableCollection<E>l - vetoable collection change listener to addpublic final void removeVetoableCollectionChangeListener(VetoableCollectionChangeListener<E> l)
removeVetoableCollectionChangeListener in interface ObservableCollection<E>l - vetoable collection change listener to removepublic final CollectionChangeListener<E>[] getCollectionChangeListeners()
CollectionChangeListeners, or
an empty array if none are registered.
getCollectionChangeListeners in interface ObservableCollection<E>CollectionChangeListeners, or
an empty array if none are registeredpublic final int getCollectionChangeListenerCount()
CollectionChangeListeners registered
to this observable collection.
getCollectionChangeListenerCount in interface ObservableCollection<E>CollectionChangeListeners registered
to this observable collectionpublic final VetoableCollectionChangeListener<E>[] getVetoableCollectionChangeListeners()
VetoableCollectionChangeListeners,
or an empty array if none are registered.
getVetoableCollectionChangeListeners in interface ObservableCollection<E>VetoableCollectionChangeListeners,
or an empty array if none are registeredpublic final int getVetoableCollectionChangeListenerCount()
VetoableCollectionChangeListeners
registered to this observable collection.
getVetoableCollectionChangeListenerCount in interface ObservableCollection<E>VetoableCollectionChangeListeners
registered to this observable collection
public void fireCollectionWillChange()
throws CollectionChangeVetoException
VetoableCollectionChangeListeners.
CollectionChangeVetoException - if any of the listeners veto the change
public void fireCollectionWillChange(VetoableCollectionChangeEvent<E> e)
throws CollectionChangeVetoException
VetoableCollectionChangeListeners.
e - will change event
CollectionChangeVetoException - if any of the listeners veto the changepublic void fireCollectionChanged()
CollectionChangeListeners.
public void fireCollectionChanged(CollectionChangeEvent<E> e)
CollectionChangeListeners.
e - change eventprotected abstract boolean preAdd(E e)
add method is about to
be called on the wrapped collection with the specified parameter.
Return true to proceed with the change.
e - add method parameter
protected abstract void postAdd(E e)
add method has just been
called on the wrapped collection with the specified parameter.
e - add method parameterprotected abstract boolean preAddAll(Collection<? extends E> coll)
addAll method is about to
be called on the wrapped collection with the specified parameter.
Return true to proceed with the change.
coll - addAll method parameter
protected abstract void postAddAll(Collection<? extends E> coll)
addAll method has just been
called on the wrapped collection with the specified parameter.
coll - addAll method parameterprotected abstract boolean preClear()
clear method is about to
be called on the wrapped collection.
Return true to proceed with the change.
protected abstract void postClear()
clear method has just been
called on the wrapped collection.
protected abstract boolean preRemove(Object o)
remove method is about to
be called on the wrapped collection with the specified parameter.
Return true to proceed with the change.
o - remove method parameter
protected abstract void postRemove(Object o)
remove method has just been
called on the wrapped collection with the specified parameter.
o - remove method parameterprotected abstract boolean preRemoveAll(Collection<?> coll)
removeAll method is about to
be called on the wrapped collection with the specified parameter.
Return true to proceed with the change.
coll - removeAll method parameter
protected abstract void postRemoveAll(Collection<?> coll)
removeAll method has just been
called on the wrapped collection with the specified parameter.
coll - removeAll method parameterprotected abstract boolean preRetainAll(Collection<?> coll)
retainAll method is about to
be called on the wrapped collection with the specified parameter.
Return true to proceed with the change.
coll - retainAll method parameter
protected abstract void postRetainAll(Collection<?> coll)
retainAll method has just been
called on the wrapped collection with the specified parameter.
coll - retainAll method parameterprotected abstract boolean preIteratorRemove()
remove method is about to
be called on the wrapped collection's iterator.
Return true to proceed with the change.
protected abstract void postIteratorRemove()
remove method has just been
called on the wrapped collection's iterator.
public boolean add(E e)
add in interface Collection<E>add in class AbstractCollectionDecorator<E>public boolean addAll(Collection<? extends E> coll)
addAll in interface Collection<E>addAll in class AbstractCollectionDecorator<E>public void clear()
clear in interface Collection<E>clear in class AbstractCollectionDecorator<E>public Iterator<E> iterator()
iterator in interface Iterable<E>iterator in interface Collection<E>iterator in class AbstractCollectionDecorator<E>public boolean remove(Object o)
remove in interface Collection<E>remove in class AbstractCollectionDecorator<E>public boolean removeAll(Collection<?> coll)
removeAll in interface Collection<E>removeAll in class AbstractCollectionDecorator<E>public boolean retainAll(Collection<?> coll)
retainAll in interface Collection<E>retainAll in class AbstractCollectionDecorator<E>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||