|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||

java.lang.Objectcz.cuni.amis.utils.collections.SimpleListener<T>
public abstract class SimpleListener<T>
Collection listener with only one method changed() called on each change.
| Constructor Summary | |
|---|---|
SimpleListener()
|
|
| Method Summary | |
|---|---|
protected abstract void |
changed(Collection<T> collection,
Collection<T> added,
Collection<T> removed)
Called when a change occures on the collection. |
void |
postAddEvent(Collection<T> alreadyAdded,
Collection<T> whereWereAdded)
Called after the elements were added to the collection. |
void |
postRemoveEvent(Collection<T> alreadyRemoved,
Collection<T> whereWereRemoved)
Called after the elements were removed from the collection. |
void |
preAddEvent(Collection<T> toBeAdded,
Collection<T> whereToAdd)
Called before the elements will be added to the collection. |
void |
preRemoveEvent(Collection<T> toBeRemoved,
Collection<T> whereToRemove)
Called before the elements will be removed from the collection. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SimpleListener()
| Method Detail |
|---|
public void preAddEvent(Collection<T> toBeAdded,
Collection<T> whereToAdd)
CollectionEventListener
preAddEvent in interface CollectionEventListener<T>toBeAdded - collection of items to be added, in case of one item this contains a collection with one item
public void postAddEvent(Collection<T> alreadyAdded,
Collection<T> whereWereAdded)
CollectionEventListener
postAddEvent in interface CollectionEventListener<T>
public void preRemoveEvent(Collection<T> toBeRemoved,
Collection<T> whereToRemove)
CollectionEventListener
preRemoveEvent in interface CollectionEventListener<T>
public void postRemoveEvent(Collection<T> alreadyRemoved,
Collection<T> whereWereRemoved)
CollectionEventListener
postRemoveEvent in interface CollectionEventListener<T>
protected abstract void changed(Collection<T> collection,
Collection<T> added,
Collection<T> removed)
collection - The changed collection.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||