Package com.esri.arcgisruntime.util
Interface ListenableList<E>
-
- Type Parameters:
E
- the type of the elements in the list
- All Superinterfaces:
java.util.Collection<E>
,java.lang.Iterable<E>
,java.util.List<E>
- All Known Implementing Classes:
BookmarkList
,DistanceCompositeSceneSymbol.RangeCollection
,LayerList
,SublayerList
,Surface.ElevationSourceList
public interface ListenableList<E> extends java.util.List<E>
This interface defines a listenable version of a List.To be notified of items being added to or removed from this list, provide an implementation of ListChangedListener via the
addListChangedListener(ListChangedListener)
method. When this listener is called back, you will be provided with a ListChangedEvent instance containing the items added or removed and the index at which they were added or removed.- Since:
- 100.0.0
- See Also:
ListChangedListener
,ListChangedEvent
,List
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addListChangedListener(ListChangedListener<E> listener)
Adds a listener for added and removed events.boolean
removeListChangedListener(ListChangedListener<E> listener)
Removes the given listener from this class instance.-
Methods inherited from interface java.util.List
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray
-
-
-
-
Method Detail
-
addListChangedListener
void addListChangedListener(ListChangedListener<E> listener)
Adds a listener for added and removed events.Adding this listener on the UI thread will cause it to be invoked on the UI thread, otherwise it is not guaranteed on which thread the listener is invoked.
- Parameters:
listener
- this listener will be called back when items are added to or removed from the list- Since:
- 100.0.0
-
removeListChangedListener
boolean removeListChangedListener(ListChangedListener<E> listener)
Removes the given listener from this class instance. It will no longer receive added or removed events.- Parameters:
listener
- listener to remove- Returns:
- true if the listenable list contained the given listener, false otherwise
- Since:
- 100.0.0
-
-