public class ListChangeEvent<T> extends java.lang.Object implements IListChangeEvent<T>
IListChangeListener
where the generics is the type of the
items.IListChangeEvent.EventType
Constructor and Description |
---|
ListChangeEvent(StateObject source,
java.util.List<? extends T> list,
IListChangeEvent.EventType eventType,
java.lang.String listName,
java.util.List<? extends T> items,
int startIndex,
int endIndex)
Creates a new
ListChangeEvent . |
Modifier and Type | Method and Description |
---|---|
int |
getEndIndex()
Returns the index of where the change occurred in the list.
|
IListChangeEvent.EventType |
getEventType()
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.String |
getListName()
Returns the name describing the list.
|
<S extends ListHolderStateObject<? extends T>> |
getSource()
Returns the source where the modification occurred and that fired the event.
|
int |
getStartIndex()
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.
|
int |
itemsSize()
Returns the number of items that caused the original list to change.
|
public ListChangeEvent(StateObject source, java.util.List<? extends T> list, IListChangeEvent.EventType eventType, java.lang.String listName, java.util.List<? extends T> items, int startIndex, int endIndex)
ListChangeEvent
.source
- The source where the modification occurred and that fired the eventpublic int getEndIndex()
getEndIndex
in interface IListChangeEvent<T>
public IListChangeEvent.EventType getEventType()
getEventType
in interface IListChangeEvent<T>
types
of changespublic java.util.List<T> getList()
getList
in interface IListChangeEvent<T>
public java.lang.String getListName()
getListName
in interface IListChangeEvent<T>
IListChangeListeners
have
been registered with the source to be notified upon changespublic <S extends ListHolderStateObject<? extends T>> S getSource()
getSource
in interface IListChangeEvent<T>
S
- The type of the source owning the listpublic int getStartIndex()
getStartIndex
in interface IListChangeEvent<T>
public ListIterable<T> items()
IListChangeEvent.EventType.ADDED
);
IListChangeEvent.EventType.REMOVED
);
IListChangeEvent.EventType.MOVED_UP
);
IListChangeEvent.EventType.MOVED_DOWN
);
IListChangeEvent.EventType.REPLACED
);
IListChangeEvent.EventType.CHANGED
).
items
in interface IListChangeEvent<T>
IListChangeEvent.EventType
public int itemsSize()
itemsSize
in interface IListChangeEvent<T>