|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.sgs.app.util.ScalableList.ScalableIterator<E>
com.sun.sgs.app.util.ScalableList.ScalableListIterator<E>
E - the type of elementstatic class ScalableList.ScalableListIterator<E>
A class which implements a ListIterator for the
ScalableList data structure. This iterator allows
bi-directional traversal and other operations native to the
ListIterator interface.
| Field Summary |
|---|
| Fields inherited from class com.sun.sgs.app.util.ScalableList.ScalableIterator |
|---|
currentNode, cursor, listNodeReferenceValue, owner, wasNextCalled |
| Constructor Summary | |
|---|---|
ScalableList.ScalableListIterator(ScalableList<E> list)
Constructor which starts the iterations at the specified ListNode. |
|
ScalableList.ScalableListIterator(ScalableList<E> list,
ScalableList.ListNode<E> startingNode,
int startingIndex)
Constructor which creates a ScalableListIterator given the
list, a startingNode and a startingIndex denoting
the starting point. |
|
ScalableList.ScalableListIterator(ScalableList<E> list,
com.sun.sgs.app.util.ScalableList.SearchResult<E> searchResult)
Constructor which creates a ScalableListIterator given the
list and a searchResult denoting the starting point. |
|
| Method Summary | ||
|---|---|---|
void |
add(E o)
Inserts the specified element into the list. |
|
(package private) void |
doRemove()
Performs the remove and updates the references if necessary |
|
boolean |
hasPrevious()
Returns true if this list iterator has more elements when traversing the list in the reverse direction. |
|
(package private) static
|
isPrevWithinRange(int offset,
ScalableList.ListNode<E> currentListNode)
Performs a check to see that the index for prev() is still
within range of the sub list. |
|
E |
next()
Retrieves the next element. |
|
int |
nextIndex()
Returns the index of the element that would be returned by a subsequent call to next. |
|
E |
previous()
Returns the previous element in the list. |
|
int |
previousIndex()
Returns the index of the element that would be returned by a subsequent call to previous. |
|
void |
remove()
Removes from the underlying collection the last element returned by the iterator. |
|
void |
set(E o)
Replaces the last element returned by next or previous with the specified element (optional operation). |
|
| Methods inherited from class com.sun.sgs.app.util.ScalableList.ScalableIterator |
|---|
checkDataIntegrity, getAbsoluteIndex, getCurrentIndex, getCursorBasedOnPreviousAction, hasNext, isNextWithinRange |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.util.ListIterator |
|---|
hasNext |
| Constructor Detail |
|---|
ScalableList.ScalableListIterator(ScalableList<E> list)
ListNode.
list - the ScalableList over which to iterate
ScalableList.ScalableListIterator(ScalableList<E> list,
ScalableList.ListNode<E> startingNode,
int startingIndex)
ScalableListIterator given the
list, a startingNode and a startingIndex denoting
the starting point. This constructor is used primarily for when the
user specifies an index that is one larger than the highest index
value.
list - a reference to the ScalableListstartingIndex - the starting index (relative)startingNode - the starting node
ScalableList.ScalableListIterator(ScalableList<E> list,
com.sun.sgs.app.util.ScalableList.SearchResult<E> searchResult)
ScalableListIterator given the
list and a searchResult denoting the starting point.
list - searchResult - | Method Detail |
|---|
static <E> boolean isPrevWithinRange(int offset,
ScalableList.ListNode<E> currentListNode)
prev() is still
within range of the sub list.
E - the type of element storedoffset - the offsetcurrentListNode - the current ListNode being examined
true if the offset exists in the sub list and
false otherwisepublic int nextIndex()
nextIndex in interface ListIterator<E>public int previousIndex()
previousIndex in interface ListIterator<E>public boolean hasPrevious()
hasPrevious in interface ListIterator<E>ConcurrentModificationException - if the ListNode has
been modified or removedpublic E previous()
previous in interface ListIterator<E>NoSuchElementException - if the iteration has no previous
element
ConcurrentModificationException - if the ListNode has
been modified or removedpublic void set(E o)
ManagedObject.
set in interface ListIterator<E>o - the element with which to replace the last element
returned by next or previous.
IllegalStateException - if the operation is called without
next or previous being calledpublic void remove()
next.
remove in interface Iterator<E>remove in interface ListIterator<E>remove in class ScalableList.ScalableIterator<E>IllegalStateException - if the method is not preceded by
next() or prev()void doRemove()
doRemove in class ScalableList.ScalableIterator<E>public E next()
next in interface Iterator<E>next in interface ListIterator<E>next in class ScalableList.ScalableIterator<E>public void add(E o)
add in interface ListIterator<E>o - the element to insert.
IndexOutOfBoundsException - if the index which the element is
to be added is out of bounds
|
RedDwarf, Version 0.10.1 2010-03-14 10:56:12 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||