public class ObservableListWrapper<E> extends ModifiableObservableListBase<E> implements ObservableList<E>, SortableList<E>, RandomAccess
modCount| Constructor and Description |
|---|
ObservableListWrapper(List<E> list) |
ObservableListWrapper(List<E> list,
Callback<E,Observable[]> extractor) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
boolean |
contains(Object o) |
boolean |
containsAll(Collection<?> c) |
protected void |
doAdd(int index,
E element)
Adds the
element to the List at the position of index. |
protected E |
doRemove(int index)
Removes the element at position of
index. |
protected E |
doSet(int index,
E element)
Sets the
element in the List at the position of index. |
E |
get(int index) |
int |
indexOf(Object o) |
int |
lastIndexOf(Object o) |
void |
remove(int fromIndex,
int toIndex)
Basically a shortcut to sublist(from, to).clear()
As this is a common operation, ObservableList has this method for convenient usage.
|
boolean |
removeAll(Collection<?> c) |
boolean |
retainAll(Collection<?> c) |
int |
size() |
void |
sort()
Sort using default comparator
|
void |
sort(Comparator<? super E> comparator)
Sort using comparator
|
add, addAll, addAll, remove, remove, removeRange, set, setAll, subListaddAll, addListener, addListener, beginChange, endChange, fireChange, hasListeners, nextAdd, nextPermutation, nextRemove, nextRemove, nextReplace, nextSet, nextUpdate, removeAll, removeListener, removeListener, retainAll, setAlladd, equals, hashCode, iterator, listIterator, listIteratorisEmpty, toArray, toArray, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitaddAll, addListener, filtered, removeAll, removeListener, retainAll, setAll, setAll, sorted, sortedaddListener, removeListeneradd, add, addAll, addAll, equals, hashCode, isEmpty, iterator, listIterator, listIterator, remove, remove, replaceAll, set, spliterator, subList, toArray, toArrayparallelStream, removeIf, streampublic ObservableListWrapper(List<E> list, Callback<E,Observable[]> extractor)
public E get(int index)
public int size()
size in interface Collection<E>size in interface List<E>size in class ModifiableObservableListBase<E>protected void doAdd(int index,
E element)
ModifiableObservableListBaseelement to the List at the position of index.
For the description of possible exceptions, please refer to the documentation
of AbstractList.add(java.lang.Object) method.
doAdd in class ModifiableObservableListBase<E>index - the position where to add the elementelement - the element that will be addedprotected E doSet(int index, E element)
ModifiableObservableListBaseelement in the List at the position of index.
For the description of possible exceptions, please refer to the documentation
of ModifiableObservableListBase.set(int, java.lang.Object) method.
doSet in class ModifiableObservableListBase<E>index - the position where to set the elementelement - the element that will be set at the specified positionprotected E doRemove(int index)
ModifiableObservableListBaseindex.doRemove in class ModifiableObservableListBase<E>index - the index of the removed elementpublic int indexOf(Object o)
public int lastIndexOf(Object o)
lastIndexOf in interface List<E>lastIndexOf in class AbstractList<E>public boolean contains(Object o)
contains in interface Collection<E>contains in interface List<E>contains in class AbstractCollection<E>public boolean containsAll(Collection<?> c)
containsAll in interface Collection<E>containsAll in interface List<E>containsAll in class AbstractCollection<E>public void clear()
clear in interface Collection<E>clear in interface List<E>clear in class AbstractList<E>public void remove(int fromIndex,
int toIndex)
ObservableListremove in interface ObservableList<E>remove in class ObservableListBase<E>fromIndex - the start of the range to remove (inclusive)toIndex - the end of the range to remove (exclusive)public boolean removeAll(Collection<?> c)
removeAll in interface Collection<E>removeAll in interface List<E>removeAll in class ModifiableObservableListBase<E>public boolean retainAll(Collection<?> c)
retainAll in interface Collection<E>retainAll in interface List<E>retainAll in class ModifiableObservableListBase<E>public void sort()
SortableListsort in interface SortableList<E>public void sort(Comparator<? super E> comparator)
SortableListCopyright © 2025. All rights reserved.