Interface IListChangeEvent<T>
-
- All Known Implementing Classes:
ListChangeEvent
public interface IListChangeEvent<T>This is used in conjunction withIListChangeListener. It contains the information regarding the content of a list being changed.- Version:
- 2.5
- Author:
- Pascal Filion
- Since:
- 2.4
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classIListChangeEvent.EventTypeThis enumeration lists the possible modification a list can have.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intgetEndIndex()Returns the index of where the change occurred in the list.IListChangeEvent.EventTypegetEventType()Returns the type of change that occurred in the list.java.util.List<T>getList()Returns a copy of the actual list after the change has happened.java.lang.StringgetListName()Returns the name describing the list.<S extends ListHolderStateObject<? extends T>>
SgetSource()Returns the source where the modification occurred and that fired the event.intgetStartIndex()Returns the index of where the change occurred in the list.ListIterable<T>items()Returns the list of items that have caused the original list to change.intitemsSize()Returns the number of items that caused the original list to change.
-
-
-
Method Detail
-
getEndIndex
int getEndIndex()
Returns the index of where the change occurred in the list.- Returns:
- The index of where the change occurred in the list
-
getEventType
IListChangeEvent.EventType getEventType()
Returns the type of change that occurred in the list.- Returns:
- One of the possible
typesof changes
-
getList
java.util.List<T> getList()
Returns a copy of the actual list after the change has happened.- Returns:
- The copy of the list that got changed
-
getListName
java.lang.String getListName()
Returns the name describing the list.- Returns:
- The name of the list for which
IListChangeListenershave been registered with the source to be notified upon changes
-
getSource
<S extends ListHolderStateObject<? extends T>> S getSource()
Returns the source where the modification occurred and that fired the event.- Type Parameters:
S- The type of the source owning the list- Returns:
- The source of the event
-
getStartIndex
int getStartIndex()
Returns the index of where the change occurred in the list.- Returns:
- The index of where the change occurred in the list
-
items
ListIterable<T> items()
Returns the list of items that have caused the original list to change. Depending on the even type:- items that have been added (
IListChangeEvent.EventType.ADDED); - items that have been removed (
IListChangeEvent.EventType.REMOVED); - items that have been moved up (
IListChangeEvent.EventType.MOVED_UP); - items that have been down (
IListChangeEvent.EventType.MOVED_DOWN); - a single item that has been replaced (
IListChangeEvent.EventType.REPLACED); - the items that were in the list before it got totally changed (
IListChangeEvent.EventType.CHANGED).
- Returns:
- The list of items associated with the
IListChangeEvent.EventType
- items that have been added (
-
itemsSize
int itemsSize()
Returns the number of items that caused the original list to change.- Returns:
- The count of items triggering this event
-
-