private static class FXCollections.CheckedObservableList<T> extends java.lang.Object implements ObservableList<T>
| 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 convenient method for var-arg adding of elements.
|
void |
addListener(InvalidationListener listener)
Adds an
InvalidationListener which will be notified whenever the
Observable becomes invalid. |
void |
addListener(ListChangeListener<? super T> o)
Add a listener to this observable list.
|
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)
Basically a shortcut to sublist(from, to).clear()
As this is a common operation, ObservableList has this method for convenient usage.
|
boolean |
remove(java.lang.Object o) |
boolean |
removeAll(java.util.Collection<?> coll) |
boolean |
removeAll(T... elements)
A convenient method for var-arg usage of removaAll method.
|
void |
removeListener(InvalidationListener listener)
Removes the given listener from the list of listeners, that are notified
whenever the value of the
Observable becomes invalid. |
void |
removeListener(ListChangeListener<? super T> o)
Tries to removed a listener from this observable list.
|
boolean |
retainAll(java.util.Collection<?> coll) |
boolean |
retainAll(T... elements)
A convenient method for var-arg usage of retain method.
|
T |
set(int index,
T element) |
boolean |
setAll(java.util.Collection<? extends T> col)
Clears the ObservableList and add all elements from the collection.
|
boolean |
setAll(T... elements)
Clears the ObservableList and add 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() |
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.lang.Objectpublic 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)
ObservableListremoveAll in interface ObservableList<T>elements - the elements to be removedpublic boolean retainAll(T... elements)
ObservableListretainAll in interface ObservableList<T>elements - the elements to be retainedpublic void remove(int from,
int to)
ObservableListremove in interface ObservableList<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 int indexOf(java.lang.Object o)
indexOf in interface java.util.List<T>public int lastIndexOf(java.lang.Object o)
lastIndexOf in interface java.util.List<T>public boolean addAll(int index,
java.util.Collection<? extends T> c)
addAll in interface java.util.List<T>public boolean addAll(java.util.Collection<? extends T> coll)
public java.util.ListIterator<T> listIterator()
listIterator in interface java.util.List<T>public java.util.ListIterator<T> listIterator(int index)
listIterator in interface java.util.List<T>public java.util.Iterator<T> iterator()
public boolean add(T e)
public java.util.List<T> subList(int fromIndex, int toIndex)
subList in interface java.util.List<T>public boolean addAll(T... elements)
ObservableListaddAll in interface ObservableList<T>elements - the elements to addpublic boolean setAll(T... elements)
ObservableListsetAll in interface ObservableList<T>elements - the elements to setpublic boolean setAll(java.util.Collection<? extends T> col)
ObservableListsetAll in interface ObservableList<T>col - the collection with elements that will be added to this observableArrayListpublic final void addListener(InvalidationListener listener)
ObservableInvalidationListener which will be notified whenever the
Observable becomes invalid. If the same
listener is added more than once, then it will be notified more than
once. That is, no check is made to ensure uniqueness.
Note that the same actual InvalidationListener instance may be
safely registered for different Observables.
The Observable stores a strong reference to the listener
which will prevent the listener from being garbage collected and may
result in a memory leak. It is recommended to either unregister a
listener by calling removeListener after use or to use an instance of
WeakInvalidationListener avoid this situation.
addListener in interface Observablelistener - The listener to registerObservable.removeListener(InvalidationListener)public final void removeListener(InvalidationListener listener)
ObservableObservable becomes invalid.
If the given listener has not been previously registered (i.e. it was never added) then this method call is a no-op. If it had been previously added then it will be removed. If it had been added more than once, then only the first occurrence will be removed.
removeListener in interface Observablelistener - The listener to removeObservable.addListener(InvalidationListener)public void addListener(ListChangeListener<? super T> o)
ObservableListaddListener in interface ObservableList<T>o - the listener for listening to the list changespublic void removeListener(ListChangeListener<? super T> o)
ObservableListremoveListener in interface ObservableList<T>o - a listener to removeCopyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms.