E
- the list element typepublic interface ObservableList<E> extends List<E>, Observable
ListChangeListener
,
ListChangeListener.Change
Modifier and Type | Method and Description |
---|---|
boolean |
addAll(E... elements)
A convenient method for var-arg adding of elements.
|
void |
addListener(ListChangeListener<? super E> listener)
Add a listener to this observable list.
|
default FilteredList<E> |
filtered(Predicate<E> predicate)
Creates a
FilteredList wrapper of this list using
the specified predicate. |
void |
remove(int from,
int to)
Basically a shortcut to sublist(from, to).clear()
As this is a common operation, ObservableList has this method for convenient usage.
|
boolean |
removeAll(E... elements)
A convenient method for var-arg usage of removaAll method.
|
void |
removeListener(ListChangeListener<? super E> listener)
Tries to removed a listener from this observable list.
|
boolean |
retainAll(E... elements)
A convenient method for var-arg usage of retain method.
|
boolean |
setAll(Collection<? extends E> col)
Clears the ObservableList and add all elements from the collection.
|
boolean |
setAll(E... elements)
Clears the ObservableList and add all the elements passed as var-args.
|
default SortedList<E> |
sorted()
Creates a
SortedList wrapper of this list with the natural
ordering. |
default SortedList<E> |
sorted(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
parallelStream, removeIf, stream
addListener, removeListener
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 setNullPointerException
- if the specified arguments contain one or more null elementsboolean setAll(Collection<? extends E> col)
col
- the collection with elements that will be added to this observableArrayListNullPointerException
- if the specified collection contains one or more null elementsboolean removeAll(E... elements)
elements
- the elements to be removedboolean retainAll(E... elements)
elements
- the elements to be retainedvoid remove(int from, int to)
from
- the start of the range to remove (inclusive)to
- the end of the range to remove (exclusive)IndexOutOfBoundsException
- if an illegal range is provideddefault FilteredList<E> filtered(Predicate<E> predicate)
FilteredList
wrapper of this list using
the specified predicate.predicate
- the predicate to useFilteredList
default SortedList<E> sorted(Comparator<E> comparator)
SortedList
wrapper of this list using
the specified comparator.comparator
- the comparator to use or null for the natural orderSortedList
default SortedList<E> sorted()
SortedList
wrapper of this list with the natural
ordering.SortedList
Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.