|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.collections4.list.AbstractLinkedList.LinkedListIterator<E>
org.apache.commons.collections4.list.CursorableLinkedList.Cursor<E>
org.apache.commons.collections4.list.CursorableLinkedList.SubCursor<E>
protected static class CursorableLinkedList.SubCursor<E>
A cursor for the sublist based on LinkedSubListIterator.
Field Summary | |
---|---|
protected AbstractLinkedList.LinkedSubList<E> |
sub
The parent list |
Fields inherited from class org.apache.commons.collections4.list.AbstractLinkedList.LinkedListIterator |
---|
current, expectedModCount, next, nextIndex, parent |
Constructor Summary | |
---|---|
protected |
CursorableLinkedList.SubCursor(AbstractLinkedList.LinkedSubList<E> sub,
int index)
Constructs a new cursor. |
Method Summary | |
---|---|
void |
add(E obj)
Adds an object to the list. |
boolean |
hasNext()
|
boolean |
hasPrevious()
Checks to see if there is a previous element that can be iterated to. |
int |
nextIndex()
Gets the index of the next element to be returned. |
void |
remove()
Removes the item last returned by this iterator. |
Methods inherited from class org.apache.commons.collections4.list.CursorableLinkedList.Cursor |
---|
checkModCount, close, nodeChanged, nodeInserted, nodeRemoved |
Methods inherited from class org.apache.commons.collections4.list.AbstractLinkedList.LinkedListIterator |
---|
getLastNodeReturned, next, previous, previousIndex, set |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final AbstractLinkedList.LinkedSubList<E> sub
Constructor Detail |
---|
protected CursorableLinkedList.SubCursor(AbstractLinkedList.LinkedSubList<E> sub, int index)
sub
- the sub listindex
- the index to start fromMethod Detail |
---|
public boolean hasNext()
hasNext
in interface Iterator<E>
hasNext
in interface ListIterator<E>
hasNext
in class AbstractLinkedList.LinkedListIterator<E>
public boolean hasPrevious()
OrderedIterator
hasPrevious
in interface ListIterator<E>
hasPrevious
in interface OrderedIterator<E>
hasPrevious
in class AbstractLinkedList.LinkedListIterator<E>
true
if the iterator has a previous elementpublic int nextIndex()
CursorableLinkedList.Cursor
nextIndex
in interface ListIterator<E>
nextIndex
in class CursorableLinkedList.Cursor<E>
public void add(E obj)
CursorableLinkedList.Cursor
add
in interface ListIterator<E>
add
in class CursorableLinkedList.Cursor<E>
obj
- the object to addpublic void remove()
CursorableLinkedList.Cursor
There may have been subsequent alterations to the list since you obtained this item, however you can still remove it. You can even remove it if the item is no longer in the main list. However, you can't call this method on the same iterator more than once without calling next() or previous().
remove
in interface Iterator<E>
remove
in interface ListIterator<E>
remove
in class CursorableLinkedList.Cursor<E>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |