|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.dishevelled.observable.AbstractSetDecorator<E>
org.dishevelled.observable.AbstractObservableSet<E>
E - set element typepublic abstract class AbstractObservableSet<E>
Abstract implementation of an observable set
that decorates an instance of Set.
| Constructor Summary | |
|---|---|
protected |
AbstractObservableSet(Set<E> set)
Create a new abstract observable set that decorates the specified set. |
| Method Summary | |
|---|---|
boolean |
add(E e)
|
boolean |
addAll(Collection<? extends E> coll)
|
void |
addSetChangeListener(SetChangeListener<E> l)
Add the specified set change listener. |
void |
addVetoableSetChangeListener(VetoableSetChangeListener<E> l)
Add the specified vetoable set change listener. |
void |
clear()
|
void |
fireSetChanged()
Fire a change event to all registered SetChangeListeners. |
void |
fireSetChanged(SetChangeEvent<E> e)
Fire the specified change event to all registered SetChangeListeners. |
void |
fireSetWillChange()
Fire a will change event to all registered VetoableSetChangeListeners. |
void |
fireSetWillChange(VetoableSetChangeEvent<E> e)
Fire the specified will change event to all registered VetoableSetChangeListeners. |
protected ObservableSetChangeSupport<E> |
getObservableSetChangeSupport()
Return the ObservableSetChangeSupport
class backing this abstract observable set. |
int |
getSetChangeListenerCount()
Return the number of SetChangeListeners registered
to this observable set. |
SetChangeListener<E>[] |
getSetChangeListeners()
Return an array of all SetChangeListeners, or
an empty array if none are registered. |
int |
getVetoableSetChangeListenerCount()
Return the number of VetoableSetChangeListeners
registered to this observable set. |
VetoableSetChangeListener<E>[] |
getVetoableSetChangeListeners()
Return an array of all VetoableSetChangeListeners,
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 set with the specified parameter. |
protected abstract void |
postAddAll(Collection<? extends E> coll)
Notify subclasses the addAll method has just been
called on the wrapped set with the specified parameter. |
protected abstract void |
postClear()
Notify subclasses the clear method has just been
called on the wrapped set. |
protected abstract void |
postIteratorRemove()
Notify subclasses the remove method has just been
called on the wrapped set's iterator. |
protected abstract void |
postRemove(Object o)
Notify subclasses the remove method has just been
called on the wrapped set with the specified parameter. |
protected abstract void |
postRemoveAll(Collection<?> coll)
Notify subclasses the removeAll method has just been
called on the wrapped set with the specified parameter. |
protected abstract void |
postRetainAll(Collection<?> coll)
Notify subclasses the retainAll method has just been
called on the wrapped set with the specified parameter. |
protected abstract boolean |
preAdd(E e)
Notify subclasses the add method is about to
be called on the wrapped set 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 set with the specified parameter. |
protected abstract boolean |
preClear()
Notify subclasses the clear method is about to
be called on the wrapped set. |
protected abstract boolean |
preIteratorRemove()
Notify subclasses the remove method is about to
be called on the wrapped set's iterator. |
protected abstract boolean |
preRemove(Object o)
Notify subclasses the remove method is about to
be called on the wrapped set with the specified parameter. |
protected abstract boolean |
preRemoveAll(Collection<?> coll)
Notify subclasses the removeAll method is about to
be called on the wrapped set with the specified parameter. |
protected abstract boolean |
preRetainAll(Collection<?> coll)
Notify subclasses the retainAll method is about to
be called on the wrapped set with the specified parameter. |
boolean |
remove(Object o)
|
boolean |
removeAll(Collection<?> coll)
|
void |
removeSetChangeListener(SetChangeListener<E> l)
Remove the specified set change listener. |
void |
removeVetoableSetChangeListener(VetoableSetChangeListener<E> l)
Remove the specified vetoable set change listener. |
boolean |
retainAll(Collection<?> coll)
|
| Methods inherited from class org.dishevelled.observable.AbstractSetDecorator |
|---|
contains, containsAll, equals, getSet, 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.Set |
|---|
contains, containsAll, equals, hashCode, isEmpty, size, toArray, toArray |
| Constructor Detail |
|---|
protected AbstractObservableSet(Set<E> set)
set - set to decorate| Method Detail |
|---|
protected final ObservableSetChangeSupport<E> getObservableSetChangeSupport()
ObservableSetChangeSupport
class backing this abstract observable set.
ObservableSetChangeSupport
class backing this abstract observable setpublic final void addSetChangeListener(SetChangeListener<E> l)
addSetChangeListener in interface ObservableSet<E>l - set change listener to addpublic final void removeSetChangeListener(SetChangeListener<E> l)
removeSetChangeListener in interface ObservableSet<E>l - set change listener to removepublic final void addVetoableSetChangeListener(VetoableSetChangeListener<E> l)
addVetoableSetChangeListener in interface ObservableSet<E>l - vetoable set change listener to addpublic final void removeVetoableSetChangeListener(VetoableSetChangeListener<E> l)
removeVetoableSetChangeListener in interface ObservableSet<E>l - vetoable set change listener to removepublic final SetChangeListener<E>[] getSetChangeListeners()
SetChangeListeners, or
an empty array if none are registered.
getSetChangeListeners in interface ObservableSet<E>SetChangeListeners, or
an empty array if none are registeredpublic final int getSetChangeListenerCount()
SetChangeListeners registered
to this observable set.
getSetChangeListenerCount in interface ObservableSet<E>SetChangeListeners registered
to this observable setpublic final VetoableSetChangeListener<E>[] getVetoableSetChangeListeners()
VetoableSetChangeListeners,
or an empty array if none are registered.
getVetoableSetChangeListeners in interface ObservableSet<E>VetoableSetChangeListeners,
or an empty array if none are registeredpublic final int getVetoableSetChangeListenerCount()
VetoableSetChangeListeners
registered to this observable set.
getVetoableSetChangeListenerCount in interface ObservableSet<E>VetoableSetChangeListeners
registered to this observable set
public void fireSetWillChange()
throws SetChangeVetoException
VetoableSetChangeListeners.
SetChangeVetoException - if any of the listeners veto the change
public void fireSetWillChange(VetoableSetChangeEvent<E> e)
throws SetChangeVetoException
VetoableSetChangeListeners.
e - will change event
SetChangeVetoException - if any of the listeners veto the changepublic void fireSetChanged()
SetChangeListeners.
public void fireSetChanged(SetChangeEvent<E> e)
SetChangeListeners.
e - change eventprotected abstract boolean preAdd(E e)
add method is about to
be called on the wrapped set 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 set 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 set 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 set with the specified parameter.
coll - addAll method parameterprotected abstract boolean preClear()
clear method is about to
be called on the wrapped set.
Return true to proceed with the change.
protected abstract void postClear()
clear method has just been
called on the wrapped set.
protected abstract boolean preRemove(Object o)
remove method is about to
be called on the wrapped set 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 set with the specified parameter.
o - remove method parameterprotected abstract boolean preRemoveAll(Collection<?> coll)
removeAll method is about to
be called on the wrapped set 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 set with the specified parameter.
coll - removeAll method parameterprotected abstract boolean preRetainAll(Collection<?> coll)
retainAll method is about to
be called on the wrapped set 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 set with the specified parameter.
coll - retainAll method parameterprotected abstract boolean preIteratorRemove()
remove method is about to
be called on the wrapped set's iterator.
Return true to proceed with the change.
protected abstract void postIteratorRemove()
remove method has just been
called on the wrapped set's iterator.
public boolean add(E e)
add in interface Collection<E>add in interface Set<E>add in class AbstractSetDecorator<E>public boolean addAll(Collection<? extends E> coll)
addAll in interface Collection<E>addAll in interface Set<E>addAll in class AbstractSetDecorator<E>public void clear()
clear in interface Collection<E>clear in interface Set<E>clear in class AbstractSetDecorator<E>public Iterator<E> iterator()
iterator in interface Iterable<E>iterator in interface Collection<E>iterator in interface Set<E>iterator in class AbstractSetDecorator<E>public boolean remove(Object o)
remove in interface Collection<E>remove in interface Set<E>remove in class AbstractSetDecorator<E>public boolean removeAll(Collection<?> coll)
removeAll in interface Collection<E>removeAll in interface Set<E>removeAll in class AbstractSetDecorator<E>public boolean retainAll(Collection<?> coll)
retainAll in interface Collection<E>retainAll in interface Set<E>retainAll in class AbstractSetDecorator<E>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||