|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cz.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(java.util.Collection<T> collection,
java.util.Collection<T> added,
java.util.Collection<T> removed)
Called when a change occures on the collection. |
void |
postAddEvent(java.util.Collection<T> alreadyAdded,
java.util.Collection<T> whereWereAdded)
Called after the elements were added to the collection. |
void |
postRemoveEvent(java.util.Collection<T> alreadyRemoved,
java.util.Collection<T> whereWereRemoved)
Called after the elements were removed from the collection. |
void |
preAddEvent(java.util.Collection<T> toBeAdded,
java.util.Collection<T> whereToAdd)
Called before the elements will be added to the collection. |
void |
preRemoveEvent(java.util.Collection<T> toBeRemoved,
java.util.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(java.util.Collection<T> toBeAdded, java.util.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 itempublic void postAddEvent(java.util.Collection<T> alreadyAdded, java.util.Collection<T> whereWereAdded)
CollectionEventListener
postAddEvent
in interface CollectionEventListener<T>
public void preRemoveEvent(java.util.Collection<T> toBeRemoved, java.util.Collection<T> whereToRemove)
CollectionEventListener
preRemoveEvent
in interface CollectionEventListener<T>
public void postRemoveEvent(java.util.Collection<T> alreadyRemoved, java.util.Collection<T> whereWereRemoved)
CollectionEventListener
postRemoveEvent
in interface CollectionEventListener<T>
protected abstract void changed(java.util.Collection<T> collection, java.util.Collection<T> added, java.util.Collection<T> removed)
collection
- The changed collection.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |