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

Type Parameters:
E -
All Superinterfaces:
java.util.EventListener
All Known Implementing Classes:
ElementListener, SimpleListener

public interface CollectionEventListener<E>
extends java.util.EventListener

Listener on collection change events.


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

Method Detail

preAddEvent

void preAddEvent(java.util.Collection<E> toBeAdded,
                 java.util.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(java.util.Collection<E> alreadyAdded,
                  java.util.Collection<E> whereWereAdded)
Called after the elements were added to the collection.

Parameters:
alreadyAdded -
whereWereAdded -

preRemoveEvent

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

Parameters:
toBeRemoved -
whereToRemove -

postRemoveEvent

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

Parameters:
alreadyAdded -
whereWereRemoved -