Top Description Inners Constructors Methods
com.sun.javafx.scene.control

public abstract Class ReadOnlyUnbackedObservableList<E>

extends ObservableListBase<E>
Class Inheritance
Known Direct Subclasses
com.sun.javafx.scene.control.TreeTableViewBackingList, javafx.scene.control.MultipleSelectionModelBase.SelectedIndicesList
Imports
java.util.Arrays, .Collection, .Iterator, .List, .ListIterator, .NoSuchElementException, javafx.collections.ListChangeListener.Change, .ObservableListBase

A read-only and unbacked ObservableList - the data is retrieved on demand by subclasses via the get method. A combination of ObservableList, ObservableListWrapper and GenericObservableList.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
public void
public void
_nextAdd(int from, int to)

public void
_nextPermutation(int from, int to, int[] perm)

public void
_nextRemove(int idx, List<? extends E> removed)

public void
public void
_nextRemove(int idx, E removed)

public void
_nextReplace(int from, int to, List<? extends E> removed)

public void
_nextSet(int idx, E old)

public void
_nextUpdate(int pos)

public boolean
add(E
element to be appended to this list
e
)

Overrides java.util.AbstractList.add.

Implements java.util.List.add, java.util.Collection.add.

Appends the specified element to the end of this list (optional operation).

public void
add(int
index at which the specified element is to be inserted
index
,
E
element to be inserted
element
)

Overrides java.util.AbstractList.add.

Implements java.util.List.add.

Inserts the specified element at the specified position in this list (optional operation).

public boolean
addAll(Collection<? extends E>
collection containing elements to be added to this list
c
)

Overrides java.util.AbstractCollection.addAll.

Implements java.util.List.addAll, java.util.Collection.addAll.

Appends all of the elements in the specified collection to the end of this list, in the order that they are returned by the specified collection's iterator (optional operation).

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 java.util.AbstractList.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
addAll(E...
the elements to add
elements
)

Overrides javafx.collections.ObservableListBase.addAll.

Implements javafx.collections.ObservableList.addAll.

A convenience method for var-arg addition of elements.

public void
public void
clear()

Overrides java.util.AbstractList.clear.

Implements java.util.List.clear, java.util.Collection.clear.

Removes all of the elements from this list (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.

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

Redeclares java.util.List.get.

Implements abstract java.util.AbstractList.get.

Returns the element at the specified position in this list.

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 boolean
isEmpty()

Overrides java.util.AbstractCollection.isEmpty.

Implements java.util.List.isEmpty, java.util.Collection.isEmpty.

Returns true if this list contains no elements.

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()

Overrides java.util.AbstractList.listIterator.

Implements java.util.List.listIterator.

Returns a list iterator over the elements in this list (in proper sequence).

public ListIterator<E>
listIterator(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 E
remove(int
the index of the element to be removed
index
)

Overrides java.util.AbstractList.remove.

Implements java.util.List.remove.

Removes the element at the specified position in this list (optional operation).

public boolean
remove(Object
element to be removed from this list, if present
o
)

Overrides java.util.AbstractCollection.remove.

Implements java.util.List.remove, java.util.Collection.remove.

Removes the first occurrence of the specified element from this list, if it is present (optional operation).

public void
remove(int
the start of the range to remove (inclusive)
from
,
int
the end of the range to remove (exclusive)
to
)

Overrides javafx.collections.ObservableListBase.remove.

Implements javafx.collections.ObservableList.remove.

A simplified way of calling sublist(from, to).clear().

public boolean
removeAll(Collection<?>
collection containing elements to be removed from this list
c
)

Overrides java.util.AbstractCollection.removeAll.

Implements java.util.List.removeAll, java.util.Collection.removeAll.

Removes from this list all of its elements that are contained in the specified collection (optional operation).

public boolean
removeAll(E...
the elements to be removed
elements
)

Overrides javafx.collections.ObservableListBase.removeAll.

Implements javafx.collections.ObservableList.removeAll.

A convenience method for var-arg usage of the removeAll method.

public boolean
retainAll(Collection<?>
collection containing elements to be retained in this list
c
)

Overrides java.util.AbstractCollection.retainAll.

Implements java.util.List.retainAll, java.util.Collection.retainAll.

Retains only the elements in this list that are contained in the specified collection (optional operation).

public boolean
retainAll(E...
the elements to be retained
elements
)

Overrides javafx.collections.ObservableListBase.retainAll.

Implements javafx.collections.ObservableList.retainAll.

A convenience method for var-arg usage of the retainAll method.

public E
set(int
index of the element to replace
index
,
E
element to be stored at the specified position
element
)

Overrides java.util.AbstractList.set.

Implements java.util.List.set.

Replaces the element at the specified position in this list with the specified element (optional operation).

public boolean
setAll(Collection<? extends E>
the collection with elements that will be added to this observableArrayList
col
)

Overrides javafx.collections.ObservableListBase.setAll.

Implements javafx.collections.ObservableList.setAll.

Clears the ObservableList and adds all elements from the collection.

public boolean
setAll(E...
the elements to set
elements
)

Overrides javafx.collections.ObservableListBase.setAll.

Implements javafx.collections.ObservableList.setAll.

Clears the ObservableList and adds all the elements passed as var-args.

public abstract int
size()

Redeclares java.util.List.size, java.util.Collection.size.

Implements abstract java.util.AbstractCollection.size.

Returns the number of elements in this list.

public List<E>
subList(final int
low endpoint (inclusive) of the subList
fromIndex
,
final int
high endpoint (exclusive) of the subList
toIndex
)

Overrides java.util.AbstractList.subList.

Implements java.util.List.subList.

Note

This method does not fulfill the subList contract from Collections, it simply returns a list containing the values in the given range.

public Object[]
toArray()

Overrides java.util.AbstractCollection.toArray.

Implements java.util.List.toArray, java.util.Collection.toArray.

Returns an array containing all of the elements in this list in proper sequence (from first to last element).

public <T> T[]
toArray(T[]
the array into which the elements of this list are to be stored, if it is big enough; otherwise, a new array of the same runtime type is allocated for this purpose.
a
)

Overrides java.util.AbstractCollection.toArray.

Implements java.util.List.toArray, java.util.Collection.toArray.

Returns an array containing all of the elements in this list in proper sequence (from first to last element); the runtime type of the returned array is that of the specified array.

public String
toString()

Overrides java.util.AbstractCollection.toString.

Returns a string representation of this collection.

Inherited from javafx.collections.ObservableListBase:
addListeneraddListenerbeginChangeendChangefireChangehasListenersnextAddnextPermutationnextRemovenextRemovenextReplacenextSetnextUpdateremoveListenerremoveListener

Constructor Detail

ReadOnlyUnbackedObservableListback to summary
public ReadOnlyUnbackedObservableList()

Method Detail

_beginChangeback to summary
public void _beginChange()
_endChangeback to summary
public void _endChange()
_nextAddback to summary
public void _nextAdd(int from, int to)
_nextPermutationback to summary
public void _nextPermutation(int from, int to, int[] perm)
_nextRemoveback to summary
public void _nextRemove(int idx, List<? extends E> removed)
_nextRemoveback to summary
public void _nextRemove(E o)
_nextRemoveback to summary
public void _nextRemove(int idx, E removed)
_nextReplaceback to summary
public void _nextReplace(int from, int to, List<? extends E> removed)
_nextSetback to summary
public void _nextSet(int idx, E old)
_nextUpdateback to summary
public void _nextUpdate(int pos)
addback to summary
public boolean add(E e)

Overrides java.util.AbstractList.add.

Implements java.util.List.add, java.util.Collection.add.

Doc from java.util.List.add.

Appends the specified element to the end of this list (optional operation).

Lists that support this operation may place limitations on what elements may be added to this list. In particular, some lists will refuse to add null elements, and others will impose restrictions on the type of elements that may be added. List classes should clearly specify in their documentation any restrictions on what elements may be added.

Parameters
e:E

element to be appended to this list

Returns:boolean

true (as specified by Collection#add)

Annotations
@Override
addback to summary
public void add(int index, E element)

Overrides java.util.AbstractList.add.

Implements java.util.List.add.

Doc from java.util.List.add.

Inserts the specified element at the specified position in this list (optional operation). Shifts the element currently at that position (if any) and any subsequent elements to the right (adds one to their indices).

Parameters
index:int

index at which the specified element is to be inserted

element:E

element to be inserted

Annotations
@Override
addAllback to summary
public boolean addAll(Collection<? extends E> c)

Overrides java.util.AbstractCollection.addAll.

Implements java.util.List.addAll, java.util.Collection.addAll.

Doc from java.util.List.addAll.

Appends all of the elements in the specified collection to the end of this list, in the order that they are returned by the specified collection's iterator (optional operation). 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
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
addAllback to summary
public boolean addAll(int index, Collection<? extends E> c)

Overrides java.util.AbstractList.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
addAllback to summary
public boolean addAll(E... elements)

Overrides javafx.collections.ObservableListBase.addAll.

Implements javafx.collections.ObservableList.addAll.

Doc from javafx.collections.ObservableList.addAll.

A convenience method for var-arg addition of elements.

Parameters
elements:E[]

the elements to add

Returns:boolean

true (as specified by Collection.add(E))

Annotations
@Override
callObserversback to summary
public void callObservers(ListChangeListener.Change<E> c)
clearback to summary
public void clear()

Overrides java.util.AbstractList.clear.

Implements java.util.List.clear, java.util.Collection.clear.

Doc from java.util.List.clear.

Removes all of the elements from this list (optional operation). The list will be empty after this call returns.

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
fireChangeback to summary
public void fireChange(Runnable r)
getback to summary
public abstract E get(int i)

Redeclares java.util.List.get.

Implements abstract java.util.AbstractList.get.

Doc from java.util.List.get.

Returns the element at the specified position in this list.

Parameters
i:int

index of the element to return

Returns:E

the element at the specified position in this list

Annotations
@Override
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
isEmptyback to summary
public boolean isEmpty()

Overrides java.util.AbstractCollection.isEmpty.

Implements java.util.List.isEmpty, java.util.Collection.isEmpty.

Doc from java.util.List.isEmpty.

Returns true if this list contains no elements.

Returns:boolean

true if this list contains no elements

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()

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).

Returns:ListIterator<E>

a list iterator over the elements in this list (in proper sequence)

Annotations
@Override
listIteratorback to summary
public ListIterator<E> listIterator(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
removeback to summary
public E remove(int index)

Overrides java.util.AbstractList.remove.

Implements java.util.List.remove.

Doc from java.util.List.remove.

Removes the element at the specified position in this list (optional operation). Shifts any subsequent elements to the left (subtracts one from their indices). Returns the element that was removed from the list.

Parameters
index:int

the index of the element to be removed

Returns:E

the element previously at the specified position

Annotations
@Override
removeback to summary
public boolean remove(Object o)

Overrides java.util.AbstractCollection.remove.

Implements java.util.List.remove, java.util.Collection.remove.

Doc from java.util.List.remove.

Removes the first occurrence of the specified element from this list, if it is present (optional operation). If this list does not contain the element, it is unchanged. More formally, removes the element with the lowest index i such that Objects.equals(o, get(i)) (if such an element exists). Returns true if this list contained the specified element (or equivalently, if this list changed as a result of the call).

Parameters
o:Object

element to be removed from this list, if present

Returns:boolean

true if this list contained the specified element

Annotations
@Override
removeback to summary
public void remove(int from, int to)

Overrides javafx.collections.ObservableListBase.remove.

Implements javafx.collections.ObservableList.remove.

Doc from javafx.collections.ObservableList.remove.

A simplified way of calling sublist(from, to).clear(). As this is a common operation, ObservableList has this method for convenient usage.

Parameters
from:int

the start of the range to remove (inclusive)

to:int

the end of the range to remove (exclusive)

Annotations
@Override
removeAllback to summary
public boolean removeAll(Collection<?> c)

Overrides java.util.AbstractCollection.removeAll.

Implements java.util.List.removeAll, java.util.Collection.removeAll.

Doc from java.util.List.removeAll.

Removes from this list all of its elements that are contained in the specified collection (optional operation).

Parameters
c:Collection<?>

collection containing elements to be removed from this list

Returns:boolean

true if this list changed as a result of the call

Annotations
@Override
removeAllback to summary
public boolean removeAll(E... elements)

Overrides javafx.collections.ObservableListBase.removeAll.

Implements javafx.collections.ObservableList.removeAll.

Doc from javafx.collections.ObservableList.removeAll.

A convenience method for var-arg usage of the removeAll method.

Parameters
elements:E[]

the elements to be removed

Returns:boolean

true if list changed as a result of this call

Annotations
@Override
retainAllback to summary
public boolean retainAll(Collection<?> c)

Overrides java.util.AbstractCollection.retainAll.

Implements java.util.List.retainAll, java.util.Collection.retainAll.

Doc from java.util.List.retainAll.

Retains only the elements in this list that are contained in the specified collection (optional operation). In other words, removes from this list all of its elements that are not contained in the specified collection.

Parameters
c:Collection<?>

collection containing elements to be retained in this list

Returns:boolean

true if this list changed as a result of the call

Annotations
@Override
retainAllback to summary
public boolean retainAll(E... elements)

Overrides javafx.collections.ObservableListBase.retainAll.

Implements javafx.collections.ObservableList.retainAll.

Doc from javafx.collections.ObservableList.retainAll.

A convenience method for var-arg usage of the retainAll method.

Parameters
elements:E[]

the elements to be retained

Returns:boolean

true if list changed as a result of this call

Annotations
@Override
setback to summary
public E set(int index, E element)

Overrides java.util.AbstractList.set.

Implements java.util.List.set.

Doc from java.util.List.set.

Replaces the element at the specified position in this list with the specified element (optional operation).

Parameters
index:int

index of the element to replace

element:E

element to be stored at the specified position

Returns:E

the element previously at the specified position

Annotations
@Override
setAllback to summary
public boolean setAll(Collection<? extends E> col)

Overrides javafx.collections.ObservableListBase.setAll.

Implements javafx.collections.ObservableList.setAll.

Doc from javafx.collections.ObservableList.setAll.

Clears the ObservableList and adds all elements from the collection.

Parameters
col:Collection<? extends E>

the collection with elements that will be added to this observableArrayList

Returns:boolean

true (as specified by Collection.add(E))

Annotations
@Override
setAllback to summary
public boolean setAll(E... elements)

Overrides javafx.collections.ObservableListBase.setAll.

Implements javafx.collections.ObservableList.setAll.

Doc from javafx.collections.ObservableList.setAll.

Clears the ObservableList and adds all the elements passed as var-args.

Parameters
elements:E[]

the elements to set

Returns:boolean

true (as specified by Collection.add(E))

Annotations
@Override
sizeback to summary
public abstract int size()

Redeclares java.util.List.size, java.util.Collection.size.

Implements abstract java.util.AbstractCollection.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
subListback to summary
public List<E> subList(final int fromIndex, final int toIndex)

Overrides java.util.AbstractList.subList.

Implements java.util.List.subList.

Note

This method does not fulfill the subList contract from Collections, it simply returns a list containing the values in the given range.

Parameters
fromIndex:int

Doc from java.util.List.subList.

low endpoint (inclusive) of the subList

toIndex:int

Doc from java.util.List.subList.

high endpoint (exclusive) of the subList

Returns:List<E>

Doc from java.util.List.subList.

a view of the specified range within this list

Annotations
@Override
toArrayback to summary
public Object[] toArray()

Overrides java.util.AbstractCollection.toArray.

Implements java.util.List.toArray, java.util.Collection.toArray.

Doc from java.util.List.toArray.

Returns an array containing all of the elements in this list in proper sequence (from first to last element).

The returned array will be "safe" in that no references to it are maintained by this list. (In other words, this method must allocate a new array even if this list is backed by an array). The caller is thus free to modify the returned array.

This method acts as bridge between array-based and collection-based APIs.

Returns:Object[]

an array containing all of the elements in this list in proper sequence

Annotations
@Override
toArrayback to summary
public <T> T[] toArray(T[] a)

Overrides java.util.AbstractCollection.toArray.

Implements java.util.List.toArray, java.util.Collection.toArray.

Doc from java.util.List.toArray.

Returns an array containing all of the elements in this list in proper sequence (from first to last element); the runtime type of the returned array is that of the specified array. If the list fits in the specified array, it is returned therein. Otherwise, a new array is allocated with the runtime type of the specified array and the size of this list.

If the list fits in the specified array with room to spare (i.e., the array has more elements than the list), the element in the array immediately following the end of the list is set to null. (This is useful in determining the length of the list only if the caller knows that the list does not contain any null elements.)

Like the toArray() method, this method acts as bridge between array-based and collection-based APIs. Further, this method allows precise control over the runtime type of the output array, and may, under certain circumstances, be used to save allocation costs.

Suppose x is a list known to contain only strings. The following code can be used to dump the list into a newly allocated array of String:

String[] y = x.toArray(new String[0]);
Note that toArray(new Object[0]) is identical in function to toArray().
Parameters
<T>

Doc from java.util.Collection.toArray. the component type of the array to contain the collection

a:T[]

the array into which the elements of this list are to be stored, if it is big enough; otherwise, a new array of the same runtime type is allocated for this purpose.

Returns:T[]

an array containing the elements of this list

Annotations
@SuppressWarnings:unchecked
@Override
toStringback to summary
public String toString()

Overrides java.util.AbstractCollection.toString.

Doc from java.util.AbstractCollection.toString.

Returns a string representation of this collection. The string representation consists of a list of the collection's elements in the order they are returned by its iterator, enclosed in square brackets ("[]"). Adjacent elements are separated by the characters ", " (comma and space). Elements are converted to strings as by String#valueOf(Object).

Returns:String

a string representation of this collection

Annotations
@Override
com.sun.javafx.scene.control back to summary

private Class ReadOnlyUnbackedObservableList.SelectionListIterator<E>

extends Object
implements ListIterator<E>
Class Inheritance
  • java.lang.Object
  • com.sun.javafx.scene.control.ReadOnlyUnbackedObservableList.SelectionListIterator
All Implemented Interfaces
java.util.ListIterator, java.util.Iterator

Field Summary

Modifier and TypeField and Description
private final ReadOnlyUnbackedObservableList<E>
private int

Constructor Summary

AccessConstructor and Description
public
public

Method Summary

Modifier and TypeMethod and Description
public void
add(E
the element to insert
e
)

Implements java.util.ListIterator.add.

Inserts the specified element into the list (optional operation).

public boolean
hasNext()

Implements java.util.ListIterator.hasNext.

Returns true if this list iterator has more elements when traversing the list in the forward direction.

public boolean
hasPrevious()

Implements java.util.ListIterator.hasPrevious.

Returns true if this list iterator has more elements when traversing the list in the reverse direction.

public E
next()

Implements java.util.ListIterator.next.

Returns the next element in the list and advances the cursor position.

public int
nextIndex()

Implements java.util.ListIterator.nextIndex.

Returns the index of the element that would be returned by a subsequent call to next.

public E
previous()

Implements java.util.ListIterator.previous.

Returns the previous element in the list and moves the cursor position backwards.

public int
previousIndex()

Implements java.util.ListIterator.previousIndex.

Returns the index of the element that would be returned by a subsequent call to previous.

public void
remove()

Implements java.util.ListIterator.remove.

Removes from the list the last element that was returned by next or previous (optional operation).

public void
set(E
the element with which to replace the last element returned by next or previous
e
)

Implements java.util.ListIterator.set.

Replaces the last element returned by next or previous with the specified element (optional operation).

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

listback to summary
private final ReadOnlyUnbackedObservableList<E> list
posback to summary
private int pos

Constructor Detail

SelectionListIteratorback to summary
public SelectionListIterator(ReadOnlyUnbackedObservableList<E> list)
SelectionListIteratorback to summary
public SelectionListIterator(ReadOnlyUnbackedObservableList<E> list, int pos)

Method Detail

addback to summary
public void add(E e)

Implements java.util.ListIterator.add.

Doc from java.util.ListIterator.add.

Inserts the specified element into the list (optional operation). The element is inserted immediately before the element that would be returned by next, if any, and after the element that would be returned by previous, if any. (If the list contains no elements, the new element becomes the sole element on the list.) The new element is inserted before the implicit cursor: a subsequent call to next would be unaffected, and a subsequent call to previous would return the new element. (This call increases by one the value that would be returned by a call to nextIndex or previousIndex.)

Parameters
e:E

the element to insert

Annotations
@Override
hasNextback to summary
public boolean hasNext()

Implements java.util.ListIterator.hasNext.

Doc from java.util.ListIterator.hasNext.

Returns true if this list iterator has more elements when traversing the list in the forward direction. (In other words, returns true if next would return an element rather than throwing an exception.)

Returns:boolean

true if the list iterator has more elements when traversing the list in the forward direction

Annotations
@Override
hasPreviousback to summary
public boolean hasPrevious()

Implements java.util.ListIterator.hasPrevious.

Doc from java.util.ListIterator.hasPrevious.

Returns true if this list iterator has more elements when traversing the list in the reverse direction. (In other words, returns true if previous would return an element rather than throwing an exception.)

Returns:boolean

true if the list iterator has more elements when traversing the list in the reverse direction

Annotations
@Override
nextback to summary
public E next()

Implements java.util.ListIterator.next.

Doc from java.util.ListIterator.next.

Returns the next element in the list and advances the cursor position. This method may be called repeatedly to iterate through the list, or intermixed with calls to previous to go back and forth. (Note that alternating calls to next and previous will return the same element repeatedly.)

Returns:E

the next element in the list

Annotations
@Override
nextIndexback to summary
public int nextIndex()

Implements java.util.ListIterator.nextIndex.

Doc from java.util.ListIterator.nextIndex.

Returns the index of the element that would be returned by a subsequent call to next. (Returns list size if the list iterator is at the end of the list.)

Returns:int

the index of the element that would be returned by a subsequent call to next, or list size if the list iterator is at the end of the list

Annotations
@Override
previousback to summary
public E previous()

Implements java.util.ListIterator.previous.

Doc from java.util.ListIterator.previous.

Returns the previous element in the list and moves the cursor position backwards. This method may be called repeatedly to iterate through the list backwards, or intermixed with calls to next to go back and forth. (Note that alternating calls to next and previous will return the same element repeatedly.)

Returns:E

the previous element in the list

Annotations
@Override
previousIndexback to summary
public int previousIndex()

Implements java.util.ListIterator.previousIndex.

Doc from java.util.ListIterator.previousIndex.

Returns the index of the element that would be returned by a subsequent call to previous. (Returns -1 if the list iterator is at the beginning of the list.)

Returns:int

the index of the element that would be returned by a subsequent call to previous, or -1 if the list iterator is at the beginning of the list

Annotations
@Override
removeback to summary
public void remove()

Implements java.util.ListIterator.remove.

Doc from java.util.ListIterator.remove.

Removes from the list the last element that was returned by next or previous (optional operation). This call can only be made once per call to next or previous. It can be made only if add has not been called after the last call to next or previous.

Annotations
@Override
setback to summary
public void set(E e)

Implements java.util.ListIterator.set.

Doc from java.util.ListIterator.set.

Replaces the last element returned by next or previous with the specified element (optional operation). This call can be made only if neither remove nor add have been called after the last call to next or previous.

Parameters
e:E

the element with which to replace the last element returned by next or previous

Annotations
@Override