Package com.esri.arcgisruntime.util
Class ListChangedEvent<T>
- java.lang.Object
-
- java.util.EventObject
-
- com.esri.arcgisruntime.util.ListChangedEvent<T>
-
- Type Parameters:
T
- type of items in the list that changed
- All Implemented Interfaces:
java.io.Serializable
public final class ListChangedEvent<T> extends java.util.EventObject
Event indicating that an item has been added to or removed from a list that implements ListenableList.In addition to the the list that fired the event, this instance will give you the items added or removed, the index they were added to/removed from and an enum that indicates whether this was an add or a remove.
- Since:
- 100.0.0
- See Also:
ListenableList
, Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ListChangedEvent.Action
Indicates the type of change that occurred on the list.
-
Constructor Summary
Constructors Constructor Description ListChangedEvent(ListenableList<T> source, int index, java.util.List<T> items, ListChangedEvent.Action action)
Creates a new ListChangedEvent instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ListChangedEvent.Action
getAction()
Indicates whether the items were added (ADDED) or removed (REMOVED).int
getIndex()
Gets the index the items were added to or removed from.java.util.List<T>
getItems()
Gets the items added to or removed from the list.ListenableList<T>
getSource()
-
-
-
Constructor Detail
-
ListChangedEvent
public ListChangedEvent(ListenableList<T> source, int index, java.util.List<T> items, ListChangedEvent.Action action)
Creates a new ListChangedEvent instance.- Parameters:
source
- the list that changedindex
- the index at which items were added or removeditems
- items affected by changeaction
- type of change- Since:
- 100.0.0
-
-
Method Detail
-
getSource
public ListenableList<T> getSource()
- Overrides:
getSource
in classjava.util.EventObject
-
getIndex
public int getIndex()
Gets the index the items were added to or removed from.- Returns:
- index the items were added to or removed from
- Since:
- 100.0.0
-
getItems
public java.util.List<T> getItems()
Gets the items added to or removed from the list.- Returns:
- an unmodifiable list of the items added to or removed from the list. This will throw an UnsupportedOperationException if an attempt is made to modify it.
- Since:
- 100.0.0
-
getAction
public ListChangedEvent.Action getAction()
Indicates whether the items were added (ADDED) or removed (REMOVED).- Returns:
- whether the item was added or removed
- Since:
- 100.0.0
-
-