E
- the list element typepublic interface ObservableList<E>
extends java.util.List<E>
ListChangeListener
,
ListChangeListener.Change
Modifier and Type | Method and Description |
---|---|
boolean |
addAll(E... elements)
A convenience method for var-arg addition of elements.
|
void |
addListener(ListChangeListener<? super E> listener)
Add a listener to this observable list.
|
default <any> |
filtered(java.util.function.Predicate<E> predicate)
Creates a
FilteredList wrapper of this list using
the specified predicate. |
void |
remove(int from,
int to)
A simplified way of calling
sublist(from, to).clear() . |
boolean |
removeAll(E... elements)
A convenience method for var-arg usage of the
removeAll method. |
void |
removeListener(ListChangeListener<? super E> listener)
Tries to remove a listener from this observable list.
|
boolean |
retainAll(E... elements)
A convenience method for var-arg usage of the
retainAll method. |
boolean |
setAll(java.util.Collection<? extends E> col)
Clears the ObservableList and adds all elements from the collection.
|
boolean |
setAll(E... elements)
Clears the ObservableList and adds all the elements passed as var-args.
|
default <any> |
sorted()
Creates a
SortedList wrapper of this list with the natural
ordering. |
default <any> |
sorted(java.util.Comparator<E> comparator)
Creates a
SortedList wrapper of this list using
the specified comparator. |
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
void addListener(ListChangeListener<? super E> listener)
listener
- the listener for listening to the list changesvoid removeListener(ListChangeListener<? super E> listener)
listener
- a listener to removeboolean addAll(E... elements)
elements
- the elements to addboolean setAll(E... elements)
elements
- the elements to setjava.lang.NullPointerException
- if the specified arguments contain one or more null elementsboolean setAll(java.util.Collection<? extends E> col)
col
- the collection with elements that will be added to this observableArrayListjava.lang.NullPointerException
- if the specified collection contains one or more null elementsboolean removeAll(E... elements)
removeAll
method.elements
- the elements to be removedboolean retainAll(E... elements)
retainAll
method.elements
- the elements to be retainedvoid remove(int from, int to)
sublist(from, to).clear()
. As this is a common operation,
ObservableList has this method for convenient usage.from
- the start of the range to remove (inclusive)to
- the end of the range to remove (exclusive)java.lang.IndexOutOfBoundsException
- if an illegal range is provideddefault <any> filtered(java.util.function.Predicate<E> predicate)
FilteredList
wrapper of this list using
the specified predicate.predicate
- the predicate to useFilteredList
default <any> sorted(java.util.Comparator<E> comparator)
SortedList
wrapper of this list using
the specified comparator.comparator
- the comparator to use or null for unordered ListSortedList
default <any> sorted()
SortedList
wrapper of this list with the natural
ordering.SortedList