public abstract class SimpleListener<T> extends Object implements CollectionEventListener<T>
Constructor and Description |
---|
SimpleListener() |
Modifier and Type | Method and Description |
---|---|
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.
|
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 itempublic 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.Copyright © 2012 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.