Top Fields Constructors Methods
com.sun.javafx.collections

public Class ObservableSequentialListWrapper<E>

extends ModifiableObservableListBase<E>
implements SortableList<E>
Class Inheritance
All Implemented Interfaces
com.sun.javafx.collections.SortableList, javafx.collections.ObservableList, javafx.beans.Observable, java.util.List, java.util.SequencedCollection, java.util.Collection, java.lang.Iterable
Imports
java.util.Collection, .Comparator, .Iterator, .List, .ListIterator, .NoSuchElementException, com.sun.javafx.collections.NonIterableChange.SimplePermutationChange, javafx.beans.InvalidationListener, .Observable, javafx.collections.ModifiableObservableListBase, javafx.util.Callback

Field Summary

Modifier and TypeField and Description
private final List<E>
private final ElementObserver<E>
private SortHelper

Constructor Summary

AccessConstructor and Description
public
public

Method Summary

Modifier and TypeMethod and Description
public boolean
addAll(int
index at which to insert the first element from the specified collection
index
,
Collection<? extends E>
collection containing elements to be added to this list
c
)

Overrides javafx.collections.ModifiableObservableListBase.addAll.

Implements java.util.List.addAll.

Inserts all of the elements in the specified collection into this list at the specified position (optional operation).

public boolean
contains(Object
element whose presence in this list is to be tested
o
)

Overrides java.util.AbstractCollection.contains.

Implements java.util.List.contains, java.util.Collection.contains.

Returns true if this list contains the specified element.

public boolean
containsAll(Collection<?>
collection to be checked for containment in this list
c
)

Overrides java.util.AbstractCollection.containsAll.

Implements java.util.List.containsAll, java.util.Collection.containsAll.

Returns true if this list contains all of the elements of the specified collection.

protected void
doAdd(int
the position where to add the element
index
,
E
the element that will be added
element
)

Implements abstract javafx.collections.ModifiableObservableListBase.doAdd.

Adds the element to the List at the position of index.

protected E
doRemove(int
the index of the removed element
index
)

Implements abstract javafx.collections.ModifiableObservableListBase.doRemove.

Removes the element at position of index.

protected E
doSet(int
the position where to set the element
index
,
E
the element that will be set at the specified position
element
)

Implements abstract javafx.collections.ModifiableObservableListBase.doSet.

Sets the element in the List at the position of index.

public void
doSort(Comparator<? super E>
the comparator for the sorting; never null
comparator
)

Implements com.sun.javafx.collections.SortableList.doSort.

Sorts the list and reports it as one change event.

public E
get(int
index of the element to return
index
)

Implements abstract javafx.collections.ModifiableObservableListBase.get.

Implements java.util.List.get.

Returns the element at the specified position in this list.

private SortHelper
public int
indexOf(Object
element to search for
o
)

Overrides java.util.AbstractList.indexOf.

Implements java.util.List.indexOf.

Returns the index of the first occurrence of the specified element in this list, or -1 if this list does not contain the element.

public Iterator<E>
iterator()

Overrides java.util.AbstractList.iterator.

Implements java.util.List.iterator, java.util.Collection.iterator.

Returns an iterator over the elements in this list in proper sequence.

public int
lastIndexOf(Object
element to search for
o
)

Overrides java.util.AbstractList.lastIndexOf.

Implements java.util.List.lastIndexOf.

Returns the index of the last occurrence of the specified element in this list, or -1 if this list does not contain the element.

public ListIterator<E>
listIterator(final int
index of the first element to be returned from the list iterator (by a call to next)
index
)

Overrides java.util.AbstractList.listIterator.

Implements java.util.List.listIterator.

Returns a list iterator over the elements in this list (in proper sequence), starting at the specified position in the list.

public int
size()

Implements abstract javafx.collections.ModifiableObservableListBase.size.

Implements java.util.List.size, java.util.Collection.size.

Returns the number of elements in this list.

Inherited from javafx.collections.ModifiableObservableListBase:
addaddAllremoveremoveremoveAllremoveRangeretainAllsetsetAllsubList

Field Detail

backingListback to summary
private final List<E> backingList
elementObserverback to summary
private final ElementObserver<E> elementObserver
helperback to summary
private SortHelper helper

Constructor Detail

ObservableSequentialListWrapperback to summary
public ObservableSequentialListWrapper(List<E> list)
ObservableSequentialListWrapperback to summary
public ObservableSequentialListWrapper(List<E> list, Callback<E, Observable[]> extractor)

Method Detail

addAllback to summary
public boolean addAll(int index, Collection<? extends E> c)

Overrides javafx.collections.ModifiableObservableListBase.addAll.

Implements java.util.List.addAll.

Doc from java.util.List.addAll.

Inserts all of the elements in the specified collection into this list at the specified position (optional operation). Shifts the element currently at that position (if any) and any subsequent elements to the right (increases their indices). The new elements will appear in this list in the order that they are returned by the specified collection's iterator. The behavior of this operation is undefined if the specified collection is modified while the operation is in progress. (Note that this will occur if the specified collection is this list, and it's nonempty.)

Parameters
index:int

index at which to insert the first element from the specified collection

c:Collection<? extends E>

collection containing elements to be added to this list

Returns:boolean

true if this list changed as a result of the call

Annotations
@Override
containsback to summary
public boolean contains(Object o)

Overrides java.util.AbstractCollection.contains.

Implements java.util.List.contains, java.util.Collection.contains.

Doc from java.util.List.contains.

Returns true if this list contains the specified element. More formally, returns true if and only if this list contains at least one element e such that Objects.equals(o, e).

Parameters
o:Object

element whose presence in this list is to be tested

Returns:boolean

true if this list contains the specified element

Annotations
@Override
containsAllback to summary
public boolean containsAll(Collection<?> c)

Overrides java.util.AbstractCollection.containsAll.

Implements java.util.List.containsAll, java.util.Collection.containsAll.

Doc from java.util.List.containsAll.

Returns true if this list contains all of the elements of the specified collection.

Parameters
c:Collection<?>

collection to be checked for containment in this list

Returns:boolean

true if this list contains all of the elements of the specified collection

Annotations
@Override
doAddback to summary
protected void doAdd(int index, E element)

Implements abstract javafx.collections.ModifiableObservableListBase.doAdd.

Doc from javafx.collections.ModifiableObservableListBase.doAdd.

Adds the element to the List at the position of index.

For the description of possible exceptions, please refer to the documentation of add(java.lang.Object) method.

Parameters
index:int

the position where to add the element

element:E

the element that will be added

Annotations
@Override
doRemoveback to summary
protected E doRemove(int index)

Implements abstract javafx.collections.ModifiableObservableListBase.doRemove.

Doc from javafx.collections.ModifiableObservableListBase.doRemove.

Removes the element at position of index.

Parameters
index:int

the index of the removed element

Returns:E

the removed element

Annotations
@Override
doSetback to summary
protected E doSet(int index, E element)

Implements abstract javafx.collections.ModifiableObservableListBase.doSet.

Doc from javafx.collections.ModifiableObservableListBase.doSet.

Sets the element in the List at the position of index.

For the description of possible exceptions, please refer to the documentation of set(int, java.lang.Object) method.

Parameters
index:int

the position where to set the element

element:E

the element that will be set at the specified position

Returns:E

the old element at the specified position

Annotations
@Override
doSortback to summary
public void doSort(Comparator<? super E> comparator)

Implements com.sun.javafx.collections.SortableList.doSort.

Doc from com.sun.javafx.collections.SortableList.doSort.

Sorts the list and reports it as one change event.

Parameters
comparator:Comparator<? super E>

the comparator for the sorting; never null

Annotations
@Override
getback to summary
public E get(int index)

Implements abstract javafx.collections.ModifiableObservableListBase.get.

Implements java.util.List.get.

Doc from java.util.List.get.

Returns the element at the specified position in this list.

Parameters
index:int

index of the element to return

Returns:E

the element at the specified position in this list

Annotations
@Override
getSortHelperback to summary
private SortHelper getSortHelper()
indexOfback to summary
public int indexOf(Object o)

Overrides java.util.AbstractList.indexOf.

Implements java.util.List.indexOf.

Doc from java.util.List.indexOf.

Returns the index of the first occurrence of the specified element in this list, or -1 if this list does not contain the element. More formally, returns the lowest index i such that Objects.equals(o, get(i)), or -1 if there is no such index.

Parameters
o:Object

element to search for

Returns:int

the index of the first occurrence of the specified element in this list, or -1 if this list does not contain the element

Annotations
@Override
iteratorback to summary
public Iterator<E> iterator()

Overrides java.util.AbstractList.iterator.

Implements java.util.List.iterator, java.util.Collection.iterator.

Doc from java.util.List.iterator.

Returns an iterator over the elements in this list in proper sequence.

Returns:Iterator<E>

an iterator over the elements in this list in proper sequence

Annotations
@Override
lastIndexOfback to summary
public int lastIndexOf(Object o)

Overrides java.util.AbstractList.lastIndexOf.

Implements java.util.List.lastIndexOf.

Doc from java.util.List.lastIndexOf.

Returns the index of the last occurrence of the specified element in this list, or -1 if this list does not contain the element. More formally, returns the highest index i such that Objects.equals(o, get(i)), or -1 if there is no such index.

Parameters
o:Object

element to search for

Returns:int

the index of the last occurrence of the specified element in this list, or -1 if this list does not contain the element

Annotations
@Override
listIteratorback to summary
public ListIterator<E> listIterator(final int index)

Overrides java.util.AbstractList.listIterator.

Implements java.util.List.listIterator.

Doc from java.util.List.listIterator.

Returns a list iterator over the elements in this list (in proper sequence), starting at the specified position in the list. The specified index indicates the first element that would be returned by an initial call to next. An initial call to previous would return the element with the specified index minus one.

Parameters
index:int

index of the first element to be returned from the list iterator (by a call to next)

Returns:ListIterator<E>

a list iterator over the elements in this list (in proper sequence), starting at the specified position in the list

Annotations
@Override
sizeback to summary
public int size()

Implements abstract javafx.collections.ModifiableObservableListBase.size.

Implements java.util.List.size, java.util.Collection.size.

Doc from java.util.List.size.

Returns the number of elements in this list. If this list contains more than Integer.MAX_VALUE elements, returns Integer.MAX_VALUE.

Returns:int

the number of elements in this list

Annotations
@Override