cz.cuni.amis.utils.collections
Interface CollectionEventListener<E>

Package class diagram package CollectionEventListener
Type Parameters:
E -
All Superinterfaces:
EventListener
All Known Implementing Classes:
ElementListener, SimpleListener

public interface CollectionEventListener<E>
extends EventListener

Listener on collection change events.

Author:
Ik

Method Summary
 void postAddEvent(Collection<E> alreadyAdded, Collection<E> whereWereAdded)
          Called after the elements were added to the collection.
 void postRemoveEvent(Collection<E> alreadyAdded, Collection<E> whereWereRemoved)
          Called after the elements were removed from the collection.
 void preAddEvent(Collection<E> toBeAdded, Collection<E> whereToAdd)
          Called before the elements will be added to the collection.
 void preRemoveEvent(Collection<E> toBeRemoved, Collection<E> whereToRemove)
          Called before the elements will be removed from the collection.
 

Method Detail

preAddEvent

void preAddEvent(Collection<E> toBeAdded,
                 Collection<E> whereToAdd)
Called before the elements will be added to the collection.

Parameters:
toBeAdded - collection of items to be added, in case of one item this contains a collection with one item
whereToAdd -

postAddEvent

void postAddEvent(Collection<E> alreadyAdded,
                  Collection<E> whereWereAdded)
Called after the elements were added to the collection.

Parameters:
alreadyAdded -
whereWereAdded -

preRemoveEvent

void preRemoveEvent(Collection<E> toBeRemoved,
                    Collection<E> whereToRemove)
Called before the elements will be removed from the collection.

Parameters:
toBeRemoved -
whereToRemove -

postRemoveEvent

void postRemoveEvent(Collection<E> alreadyAdded,
                     Collection<E> whereWereRemoved)
Called after the elements were removed from the collection.

Parameters:
alreadyAdded -
whereWereRemoved -


Copyright © 2013 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.