public abstract class AbstractEventListCalculation<N,E> extends AbstractCalculation<N> implements ListEventListener<E>
inserted(E) updates the value of this Calculation to include the inserted elementdeleted(E) updates the value of this Calculation to exclude the deleted elementupdated(E, E) updates the value of this Calculation to include the replacement element and exclude the prior element| Modifier | Constructor and Description |
|---|---|
protected |
AbstractEventListCalculation(N initialValue,
EventList<E> source) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
deleted(E oldElement)
Updates the value of this Calculation to exclude the information from
the
oldElement. |
void |
dispose()
Releases the resources consumed by this
AbstractEventListCalculation
so that it may eventually be garbage collected. |
protected abstract void |
inserted(E newElement)
Updates the value of this Calculation to include the information from
the
newElement. |
void |
listChanged(ListEvent<E> listChanges)
Updates the value of this Calculation in response to the
listChanges. |
protected abstract void |
updated(E oldElement,
E newElement)
Updates the value of this Calculation to exclude the information from
the
oldElement and include the information from the
newElement. |
addPropertyChangeListener, fireValueChange, getName, getValue, removePropertyChangeListener, setName, setValuepublic void dispose()
AbstractEventListCalculation
so that it may eventually be garbage collected.
An AbstractEventListCalculation will be garbage collected
without a call to dispose(), but not before its source
EventList is garbage collected. By calling dispose(),
you allow the AbstractEventListCalculation to be garbage
collected before its source EventList. This is necessary for
situations where an AbstractEventListCalculation is short-lived
but its source EventList is long-lived.
dispose in interface Calculation<N>protected abstract void inserted(E newElement)
newElement.newElement - the new element within the EventListprotected abstract void deleted(E oldElement)
oldElement.oldElement - the old element within the EventListprotected abstract void updated(E oldElement, E newElement)
oldElement and include the information from the
newElement.oldElement - the old element within the EventListnewElement - the new element which replaced the oldElementpublic void listChanged(ListEvent<E> listChanges)
listChanges.listChanged in interface ListEventListener<E>listChanges - describes the changes to the backing EventListGlazed Lists, Copyright © 2003 publicobject.com, O'Dell Engineering.
Documentation build by mockbuild at 2017-07-26 15:03