private static class FXCollections.CheckedObservableList<T> extends ObservableListBase<T> implements ObservableList<T>
Modifier and Type | Field and Description |
---|---|
private ObservableList<T> |
list |
private ListChangeListener<T> |
listener |
private java.lang.Class<T> |
type |
Constructor and Description |
---|
CheckedObservableList(ObservableList<T> list,
java.lang.Class<T> type) |
Modifier and Type | Method and Description |
---|---|
void |
add(int index,
T element) |
boolean |
add(T e) |
boolean |
addAll(java.util.Collection<? extends T> coll) |
boolean |
addAll(int index,
java.util.Collection<? extends T> c) |
boolean |
addAll(T... elements)
A convenience method for var-arg addition of elements.
|
void |
clear() |
boolean |
contains(java.lang.Object o) |
boolean |
containsAll(java.util.Collection<?> coll) |
boolean |
equals(java.lang.Object o) |
T |
get(int index) |
int |
hashCode() |
int |
indexOf(java.lang.Object o) |
boolean |
isEmpty() |
java.util.Iterator<T> |
iterator() |
int |
lastIndexOf(java.lang.Object o) |
java.util.ListIterator<T> |
listIterator() |
java.util.ListIterator<T> |
listIterator(int index) |
T |
remove(int index) |
void |
remove(int from,
int to)
A simplified way of calling
sublist(from, to).clear() . |
boolean |
remove(java.lang.Object o) |
boolean |
removeAll(java.util.Collection<?> coll) |
boolean |
removeAll(T... elements)
A convenience method for var-arg usage of the
removeAll method. |
boolean |
retainAll(java.util.Collection<?> coll) |
boolean |
retainAll(T... elements)
A convenience method for var-arg usage of the
retainAll method. |
T |
set(int index,
T element) |
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() |
java.util.List<T> |
subList(int fromIndex,
int toIndex) |
java.lang.Object[] |
toArray() |
<T> T[] |
toArray(T[] a) |
java.lang.String |
toString() |
(package private) void |
typeCheck(java.lang.Object o) |
addListener, beginChange, endChange, fireChange, hasListeners, nextAdd, nextPermutation, nextRemove, nextRemove, nextReplace, nextSet, nextUpdate, removeListener
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
addListener, filtered, removeListener, sorted, sorted
private final ObservableList<T> list
private final java.lang.Class<T> type
private final ListChangeListener<T> listener
CheckedObservableList(ObservableList<T> list, java.lang.Class<T> type)
void typeCheck(java.lang.Object o)
public int size()
public boolean isEmpty()
public boolean contains(java.lang.Object o)
public java.lang.Object[] toArray()
public <T> T[] toArray(T[] a)
public java.lang.String toString()
toString
in class java.util.AbstractCollection<T>
public boolean remove(java.lang.Object o)
public boolean containsAll(java.util.Collection<?> coll)
public boolean removeAll(java.util.Collection<?> coll)
public boolean retainAll(java.util.Collection<?> coll)
public 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)public void clear()
public boolean equals(java.lang.Object o)
public int hashCode()
public T get(int index)
public T remove(int index)
public int indexOf(java.lang.Object o)
public int lastIndexOf(java.lang.Object o)
public void add(int index, T element)
public boolean addAll(int index, java.util.Collection<? extends T> c)
public boolean addAll(java.util.Collection<? extends T> coll)
public java.util.ListIterator<T> listIterator()
public java.util.ListIterator<T> listIterator(int index)
public java.util.Iterator<T> iterator()
public boolean add(T e)
public java.util.List<T> subList(int fromIndex, int toIndex)
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 observableArrayList