Interface ObservableList<E>
- Type Parameters:
E- the type of elements in the list
- All Superinterfaces:
Collection<E>,Iterable<E>,List<E>
- All Known Implementing Classes:
ObservableListBase
A list that can be observed for changes.
A change will be fired whenever elements are added or removed from the list
and can be listened to by adding a ListChangeListener.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanA convenience method to add varargs elements to the list.voidaddListener(ListChangeListener<? super E> listener) Adds a listener that is called whenever the list changes.booleanA convenience method to remove varargs elements from the list.voidremoveListener(ListChangeListener<? super E> listener) Removes a listener.Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods 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 Details
-
addListener
Adds a listener that is called whenever the list changes.- Parameters:
listener- the listener
-
removeListener
Removes a listener.- Parameters:
listener- the listener
-
addAll
A convenience method to add varargs elements to the list.- Parameters:
elements- the elements to add- Returns:
- true if the list was changed as a result of this call
-
removeAll
A convenience method to remove varargs elements from the list.- Parameters:
elements- the elements to remove- Returns:
- true if the list was changed as a result of this call
-