org.apache.pivot.collections
Interface ListListener<T>

All Known Implementing Classes:
List.ListListenerList, ListListener.Adapter

public interface ListListener<T>

List listener interface.


Nested Class Summary
static class ListListener.Adapter<T>
          List listener adapter.
 
Method Summary
 void comparatorChanged(List<T> list, Comparator<T> previousComparator)
          Called when a list's comparator has changed.
 void itemInserted(List<T> list, int index)
          Called when an item has been inserted into a list.
 void itemsRemoved(List<T> list, int index, Sequence<T> items)
          Called when items have been removed from a list.
 void itemUpdated(List<T> list, int index, T previousItem)
          Called when a list item has been updated.
 void listCleared(List<T> list)
          Called when list data has been reset.
 

Method Detail

itemInserted

void itemInserted(List<T> list,
                  int index)
Called when an item has been inserted into a list.

Parameters:
list - The source of the list event.
index - The index at which the item was added.

itemsRemoved

void itemsRemoved(List<T> list,
                  int index,
                  Sequence<T> items)
Called when items have been removed from a list.

Parameters:
list - The source of the list event.
index - The starting index from which items have been removed.
items - The items that were removed from the list.

itemUpdated

void itemUpdated(List<T> list,
                 int index,
                 T previousItem)
Called when a list item has been updated.

Parameters:
list - The source of the list event.
index - The index of the item that was updated.
previousItem - The item that was previously stored at index.

listCleared

void listCleared(List<T> list)
Called when list data has been reset.

Parameters:
list - The source of the list event.

comparatorChanged

void comparatorChanged(List<T> list,
                       Comparator<T> previousComparator)
Called when a list's comparator has changed.

Parameters:
list - The source of the event.
previousComparator - The previous comparator value.