private static class FXCollections.UnmodifiableObservableListImpl<T> extends ObservableListBase<T> implements ObservableList<T>
Modifier and Type | Field and Description |
---|---|
private ObservableList<T> |
backingList |
private ListChangeListener<T> |
listener |
Constructor and Description |
---|
UnmodifiableObservableListImpl(ObservableList<T> backingList) |
Modifier and Type | Method and Description |
---|---|
boolean |
addAll(T... elements)
A convenience method for var-arg addition of elements.
|
T |
get(int index) |
void |
remove(int from,
int to)
A simplified way of calling
sublist(from, to).clear() . |
boolean |
removeAll(T... elements)
A convenience method for var-arg usage of the
removeAll method. |
boolean |
retainAll(T... elements)
A convenience method for var-arg usage of the
retainAll method. |
boolean |
setAll(java.util.Collection<? extends T> col)
Clears the ObservableList and adds all elements from the collection.
|
boolean |
setAll(T... elements)
Clears the ObservableList and adds all the elements passed as var-args.
|
int |
size() |
addListener, beginChange, endChange, fireChange, hasListeners, nextAdd, nextPermutation, nextRemove, nextRemove, nextReplace, nextSet, nextUpdate, removeListener
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subList
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
addListener, filtered, removeListener, sorted, sorted
private final ObservableList<T> backingList
private final ListChangeListener<T> listener
public UnmodifiableObservableListImpl(ObservableList<T> backingList)
public T get(int index)
public int size()
public boolean addAll(T... elements)
ObservableList
addAll
in interface ObservableList<T>
addAll
in class ObservableListBase<T>
elements
- the elements to addpublic boolean setAll(T... elements)
ObservableList
setAll
in interface ObservableList<T>
setAll
in class ObservableListBase<T>
elements
- the elements to setpublic boolean setAll(java.util.Collection<? extends T> col)
ObservableList
setAll
in interface ObservableList<T>
setAll
in class ObservableListBase<T>
col
- the collection with elements that will be added to this observableArrayListpublic boolean removeAll(T... elements)
ObservableList
removeAll
method.removeAll
in interface ObservableList<T>
removeAll
in class ObservableListBase<T>
elements
- the elements to be removedpublic boolean retainAll(T... elements)
ObservableList
retainAll
method.retainAll
in interface ObservableList<T>
retainAll
in class ObservableListBase<T>
elements
- the elements to be retainedpublic void remove(int from, int to)
ObservableList
sublist(from, to).clear()
. As this is a common operation,
ObservableList has this method for convenient usage.remove
in interface ObservableList<T>
remove
in class ObservableListBase<T>
from
- the start of the range to remove (inclusive)to
- the end of the range to remove (exclusive)