|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.dishevelled.observable.AbstractQueueDecorator<E>
org.dishevelled.observable.AbstractObservableQueue<E>
E - queue element typepublic abstract class AbstractObservableQueue<E>
Abstract implementation of an observable queue
that decorates an instance of Queue.
| Constructor Summary | |
|---|---|
protected |
AbstractObservableQueue(Queue<E> queue)
Create a new abstract observable queue that decorates the specified queue. |
| Method Summary | |
|---|---|
boolean |
add(E e)
|
boolean |
addAll(Collection<? extends E> coll)
|
void |
addQueueChangeListener(QueueChangeListener<E> l)
Add the specified queue change listener. |
void |
addVetoableQueueChangeListener(VetoableQueueChangeListener<E> l)
Add the specified vetoable queue change listener. |
void |
clear()
|
void |
fireQueueChanged()
Fire a change event to all registered QueueChangeListeners. |
void |
fireQueueChanged(QueueChangeEvent<E> e)
Fire the specified change event to all registered QueueChangeListeners. |
void |
fireQueueWillChange()
Fire a will change event to all registered VetoableQueueChangeListeners. |
void |
fireQueueWillChange(VetoableQueueChangeEvent<E> e)
Fire the specified will change event to all registered VetoableQueueChangeListeners. |
protected ObservableQueueChangeSupport<E> |
getObservableQueueChangeSupport()
Return the ObservableQueueChangeSupport
class backing this abstract observable queue. |
int |
getQueueChangeListenerCount()
Return the number of QueueChangeListeners registered
to this observable queue. |
QueueChangeListener<E>[] |
getQueueChangeListeners()
Return an array of all QueueChangeListeners, or
an empty array if none are registered. |
int |
getVetoableQueueChangeListenerCount()
Return the number of VetoableQueueChangeListeners
registered to this observable queue. |
VetoableQueueChangeListener<E>[] |
getVetoableQueueChangeListeners()
Return an array of all VetoableQueueChangeListeners,
or an empty array if none are registered. |
Iterator<E> |
iterator()
|
boolean |
offer(E e)
|
E |
poll()
|
protected abstract void |
postAdd(E e)
Notify subclasses the add method has just been
called on the wrapped queue with the specified parameter. |
protected abstract void |
postAddAll(Collection<? extends E> coll)
Notify subclasses the addAll method has just been
called on the wrapped queue with the specified parameter. |
protected abstract void |
postClear()
Notify subclasses the clear method has just been
called on the wrapped queue. |
protected abstract void |
postIteratorRemove()
Notify subclasses the remove method has just been
called on the wrapped queue's iterator. |
protected abstract void |
postOffer(E e)
Notify subclasses the offer method has just been
called on the wrapped queue with the specified parameter. |
protected abstract void |
postPoll()
Notify subclasses the poll method has just been
called on the wrapped queue. |
protected abstract void |
postRemove(Object o)
Notify subclasses the remove method has just been
called on the wrapped queue with the specified parameter. |
protected abstract void |
postRemoveAll(Collection<?> coll)
Notify subclasses the removeAll method has just been
called on the wrapped queue with the specified parameter. |
protected abstract void |
postRetainAll(Collection<?> coll)
Notify subclasses the retainAll method has just been
called on the wrapped queue with the specified parameter. |
protected abstract boolean |
preAdd(E e)
Notify subclasses the add method is about to
be called on the wrapped queue 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 queue with the specified parameter. |
protected abstract boolean |
preClear()
Notify subclasses the clear method is about to
be called on the wrapped queue. |
protected abstract boolean |
preIteratorRemove()
Notify subclasses the remove method is about to
be called on the wrapped queue's iterator. |
protected abstract boolean |
preOffer(E e)
Notify subclasses the offer method is about to
be called on the wrapped queue with the specified parameter. |
protected abstract boolean |
prePoll()
Notify subclasses the poll method is about to
be called on the wrapped queue. |
protected abstract boolean |
preRemove(Object o)
Notify subclasses the remove method is about to
be called on the wrapped queue with the specified parameter. |
protected abstract boolean |
preRemoveAll(Collection<?> coll)
Notify subclasses the removeAll method is about to
be called on the wrapped queue with the specified parameter. |
protected abstract boolean |
preRetainAll(Collection<?> coll)
Notify subclasses the retainAll method is about to
be called on the wrapped queue with the specified parameter. |
boolean |
remove(Object o)
|
boolean |
removeAll(Collection<?> coll)
|
void |
removeQueueChangeListener(QueueChangeListener<E> l)
Remove the specified queue change listener. |
void |
removeVetoableQueueChangeListener(VetoableQueueChangeListener<E> l)
Remove the specified vetoable queue change listener. |
boolean |
retainAll(Collection<?> coll)
|
| Methods inherited from class org.dishevelled.observable.AbstractQueueDecorator |
|---|
contains, containsAll, element, equals, getQueue, hashCode, isEmpty, peek, remove, 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.Queue |
|---|
element, peek, remove |
| Methods inherited from interface java.util.Collection |
|---|
contains, containsAll, equals, hashCode, isEmpty, size, toArray, toArray |
| Constructor Detail |
|---|
protected AbstractObservableQueue(Queue<E> queue)
queue - queue to decorate| Method Detail |
|---|
protected final ObservableQueueChangeSupport<E> getObservableQueueChangeSupport()
ObservableQueueChangeSupport
class backing this abstract observable queue.
ObservableQueueChangeSupport
class backing this abstract observable queuepublic final void addQueueChangeListener(QueueChangeListener<E> l)
addQueueChangeListener in interface ObservableQueue<E>l - queue change listener to addpublic final void removeQueueChangeListener(QueueChangeListener<E> l)
removeQueueChangeListener in interface ObservableQueue<E>l - queue change listener to removepublic final void addVetoableQueueChangeListener(VetoableQueueChangeListener<E> l)
addVetoableQueueChangeListener in interface ObservableQueue<E>l - vetoable queue change listener to addpublic final void removeVetoableQueueChangeListener(VetoableQueueChangeListener<E> l)
removeVetoableQueueChangeListener in interface ObservableQueue<E>l - vetoable queue change listener to removepublic final QueueChangeListener<E>[] getQueueChangeListeners()
QueueChangeListeners, or
an empty array if none are registered.
getQueueChangeListeners in interface ObservableQueue<E>QueueChangeListeners, or
an empty array if none are registeredpublic final int getQueueChangeListenerCount()
QueueChangeListeners registered
to this observable queue.
getQueueChangeListenerCount in interface ObservableQueue<E>QueueChangeListeners registered
to this observable queuepublic final VetoableQueueChangeListener<E>[] getVetoableQueueChangeListeners()
VetoableQueueChangeListeners,
or an empty array if none are registered.
getVetoableQueueChangeListeners in interface ObservableQueue<E>VetoableQueueChangeListeners,
or an empty array if none are registeredpublic final int getVetoableQueueChangeListenerCount()
VetoableQueueChangeListeners
registered to this observable queue.
getVetoableQueueChangeListenerCount in interface ObservableQueue<E>VetoableQueueChangeListeners
registered to this observable queue
public void fireQueueWillChange()
throws QueueChangeVetoException
VetoableQueueChangeListeners.
QueueChangeVetoException - if any of the listeners veto the change
public void fireQueueWillChange(VetoableQueueChangeEvent<E> e)
throws QueueChangeVetoException
VetoableQueueChangeListeners.
e - will change event
QueueChangeVetoException - if any of the listeners veto the changepublic void fireQueueChanged()
QueueChangeListeners.
public void fireQueueChanged(QueueChangeEvent<E> e)
QueueChangeListeners.
e - change eventprotected abstract boolean preAdd(E e)
add method is about to
be called on the wrapped queue 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 queue 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 queue 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 queue with the specified parameter.
coll - addAll method parameterprotected abstract boolean preClear()
clear method is about to
be called on the wrapped queue.
Return true to proceed with the change.
protected abstract void postClear()
clear method has just been
called on the wrapped queue.
protected abstract boolean preRemove(Object o)
remove method is about to
be called on the wrapped queue 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 queue with the specified parameter.
o - remove method parameterprotected abstract boolean preRemoveAll(Collection<?> coll)
removeAll method is about to
be called on the wrapped queue 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 queue with the specified parameter.
coll - removeAll method parameterprotected abstract boolean preRetainAll(Collection<?> coll)
retainAll method is about to
be called on the wrapped queue 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 queue with the specified parameter.
coll - retainAll method parameterprotected abstract boolean preIteratorRemove()
remove method is about to
be called on the wrapped queue's iterator.
Return true to proceed with the change.
protected abstract void postIteratorRemove()
remove method has just been
called on the wrapped queue's iterator.
protected abstract boolean preOffer(E e)
offer method is about to
be called on the wrapped queue with the specified parameter.
Return true to proceed with the change.
e - offer method parameter
protected abstract void postOffer(E e)
offer method has just been
called on the wrapped queue with the specified parameter.
e - offer method parameterprotected abstract boolean prePoll()
poll method is about to
be called on the wrapped queue.
Return true to proceed with the change.
protected abstract void postPoll()
poll method has just been
called on the wrapped queue.
public boolean add(E e)
add in interface Collection<E>add in interface Queue<E>add in class AbstractQueueDecorator<E>public boolean addAll(Collection<? extends E> coll)
addAll in interface Collection<E>addAll in class AbstractQueueDecorator<E>public void clear()
clear in interface Collection<E>clear in class AbstractQueueDecorator<E>public Iterator<E> iterator()
iterator in interface Iterable<E>iterator in interface Collection<E>iterator in class AbstractQueueDecorator<E>public boolean remove(Object o)
remove in interface Collection<E>remove in class AbstractQueueDecorator<E>public boolean removeAll(Collection<?> coll)
removeAll in interface Collection<E>removeAll in class AbstractQueueDecorator<E>public boolean retainAll(Collection<?> coll)
retainAll in interface Collection<E>retainAll in class AbstractQueueDecorator<E>public boolean offer(E e)
offer in interface Queue<E>offer in class AbstractQueueDecorator<E>public E poll()
poll in interface Queue<E>poll in class AbstractQueueDecorator<E>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||