private static class FXCollections.EmptyObservableList<E> extends java.util.AbstractList<E> implements ObservableList<E>
Modifier and Type | Field and Description |
---|---|
private static java.util.ListIterator |
iterator |
Constructor and Description |
---|
EmptyObservableList() |
Modifier and Type | Method and Description |
---|---|
boolean |
addAll(E... elements)
A convenience method for var-arg addition of elements.
|
void |
addListener(InvalidationListener listener)
Add a listener to this observable list.
|
boolean |
contains(java.lang.Object o) |
boolean |
containsAll(java.util.Collection<?> c) |
E |
get(int index) |
int |
indexOf(java.lang.Object o) |
java.util.Iterator<E> |
iterator() |
int |
lastIndexOf(java.lang.Object o) |
java.util.ListIterator<E> |
listIterator() |
java.util.ListIterator<E> |
listIterator(int index) |
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(InvalidationListener 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.
|
int |
size() |
java.util.List<E> |
subList(int fromIndex,
int toIndex) |
add, add, addAll, clear, equals, hashCode, remove, removeRange, set
addAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
filtered, sorted, sorted
public final void addListener(InvalidationListener listener)
ObservableList
addListener
in interface ObservableList<E>
listener
- the listener for listening to the list changespublic final void removeListener(InvalidationListener listener)
ObservableList
removeListener
in interface ObservableList<E>
listener
- a listener to removepublic int size()
public boolean contains(java.lang.Object o)
public java.util.Iterator<E> iterator()
public boolean containsAll(java.util.Collection<?> c)
public E get(int index)
public int indexOf(java.lang.Object o)
public int lastIndexOf(java.lang.Object o)
public java.util.ListIterator<E> listIterator()
public java.util.ListIterator<E> listIterator(int index)
public java.util.List<E> subList(int fromIndex, int toIndex)
public boolean addAll(E... elements)
ObservableList
addAll
in interface ObservableList<E>
elements
- the elements to addpublic boolean setAll(E... elements)
ObservableList
setAll
in interface ObservableList<E>
elements
- the elements to setpublic boolean setAll(java.util.Collection<? extends E> col)
ObservableList
setAll
in interface ObservableList<E>
col
- the collection with elements that will be added to this observableArrayListpublic boolean removeAll(E... elements)
ObservableList
removeAll
method.removeAll
in interface ObservableList<E>
elements
- the elements to be removedpublic boolean retainAll(E... elements)
ObservableList
retainAll
method.retainAll
in interface ObservableList<E>
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<E>
from
- the start of the range to remove (inclusive)to
- the end of the range to remove (exclusive)