Interface IListChangeEvent<T>
- All Known Implementing Classes:
ListChangeEvent
public interface IListChangeEvent<T>
This is used in conjunction with
IListChangeListener
. It contains the information
regarding the content of a list being changed.- Since:
- 2.4
- Version:
- 2.5
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic enum
This enumeration lists the possible modification a list can have. -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the index of where the change occurred in the list.Returns the type of change that occurred in the list.getList()
Returns a copy of the actual list after the change has happened.Returns the name describing the list.<S extends ListHolderStateObject<? extends T>>
SReturns the source where the modification occurred and that fired the event.int
Returns the index of where the change occurred in the list.items()
Returns the list of items that have caused the original list to change.int
Returns the number of items that caused the original list to change.
-
Method Details
-
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
types
of changes
-
getList
Returns a copy of the actual list after the change has happened.- Returns:
- The copy of the list that got changed
-
getListName
String getListName()Returns the name describing the list.- Returns:
- The name of the list for which
IListChangeListeners
have been registered with the source to be notified upon changes
-
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
-