public final class ElementObservableListDecorator<E> extends ObservableListBase<E> implements ObservableList<E>
Modifier and Type | Field and Description |
---|---|
private ObservableList<E> |
decoratedList |
private ListChangeListener<E> |
listener |
private ElementObserver<E> |
observer |
Constructor and Description |
---|
ElementObservableListDecorator(ObservableList<E> decorated,
Callback<E,Observable[]> extractor) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(E e) |
void |
add(int index,
E element) |
boolean |
addAll(java.util.Collection<? extends E> c) |
boolean |
addAll(E... elements)
A convenient method for var-arg adding of elements.
|
boolean |
addAll(int index,
java.util.Collection<? extends E> c) |
void |
clear() |
boolean |
contains(java.lang.Object o) |
boolean |
containsAll(java.util.Collection<?> c) |
E |
get(int index) |
int |
indexOf(java.lang.Object o) |
boolean |
isEmpty() |
java.util.Iterator<E> |
iterator() |
int |
lastIndexOf(java.lang.Object o) |
java.util.ListIterator<E> |
listIterator() |
java.util.ListIterator<E> |
listIterator(int index) |
E |
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<?> c) |
boolean |
removeAll(E... elements)
A convenient method for var-arg usage of removaAll method.
|
boolean |
retainAll(java.util.Collection<?> c) |
boolean |
retainAll(E... elements)
A convenient method for var-arg usage of retain method.
|
E |
set(int index,
E element) |
boolean |
setAll(java.util.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.
|
int |
size() |
java.util.List<E> |
subList(int fromIndex,
int toIndex) |
java.lang.Object[] |
toArray() |
<T> T[] |
toArray(T[] a) |
addListener, addListener, beginChange, endChange, fireChange, hasListeners, nextAdd, nextPermutation, nextRemove, nextRemove, nextReplace, nextSet, nextUpdate, removeListener, removeListener
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
addListener, filtered, removeListener, sorted, sorted
addListener, removeListener
private final ObservableList<E> decoratedList
private final ListChangeListener<E> listener
private ElementObserver<E> observer
public ElementObservableListDecorator(ObservableList<E> decorated, Callback<E,Observable[]> extractor)
public <T> T[] toArray(T[] a)
public java.lang.Object[] toArray()
public java.util.List<E> subList(int fromIndex, int toIndex)
public int size()
public boolean retainAll(java.util.Collection<?> c)
public boolean removeAll(java.util.Collection<?> c)
public E remove(int index)
public boolean remove(java.lang.Object o)
public java.util.ListIterator<E> listIterator(int index)
public java.util.ListIterator<E> listIterator()
public int lastIndexOf(java.lang.Object o)
public java.util.Iterator<E> iterator()
public boolean isEmpty()
public int indexOf(java.lang.Object o)
public E get(int index)
public boolean containsAll(java.util.Collection<?> c)
public boolean contains(java.lang.Object o)
public void clear()
public boolean addAll(int index, java.util.Collection<? extends E> c)
public boolean addAll(java.util.Collection<? extends E> c)
public void add(int index, E element)
public boolean add(E e)
public boolean setAll(java.util.Collection<? extends E> col)
ObservableList
setAll
in interface ObservableList<E>
setAll
in class ObservableListBase<E>
col
- the collection with elements that will be added to this observableArrayListpublic boolean setAll(E... elements)
ObservableList
setAll
in interface ObservableList<E>
setAll
in class ObservableListBase<E>
elements
- the elements to setpublic boolean retainAll(E... elements)
ObservableList
retainAll
in interface ObservableList<E>
retainAll
in class ObservableListBase<E>
elements
- the elements to be retainedpublic boolean removeAll(E... elements)
ObservableList
removeAll
in interface ObservableList<E>
removeAll
in class ObservableListBase<E>
elements
- the elements to be removedpublic void remove(int from, int to)
ObservableList
remove
in interface ObservableList<E>
remove
in class ObservableListBase<E>
from
- the start of the range to remove (inclusive)to
- the end of the range to remove (exclusive)public boolean addAll(E... elements)
ObservableList
addAll
in interface ObservableList<E>
addAll
in class ObservableListBase<E>
elements
- the elements to add