Package org.apache.commons.collections
Class CursorableLinkedList.Cursor
- java.lang.Object
-
- org.apache.commons.collections.CursorableLinkedList.ListIter
-
- org.apache.commons.collections.CursorableLinkedList.Cursor
-
- All Implemented Interfaces:
java.util.Iterator
,java.util.ListIterator
- Enclosing class:
- CursorableLinkedList
public class CursorableLinkedList.Cursor extends CursorableLinkedList.ListIter implements java.util.ListIterator
-
-
Field Summary
Fields Modifier and Type Field Description (package private) boolean
_valid
-
Fields inherited from class org.apache.commons.collections.CursorableLinkedList.ListIter
_cur, _expectedModCount, _lastReturned, _nextIndex
-
-
Constructor Summary
Constructors Constructor Description Cursor(int index)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(java.lang.Object o)
protected void
checkForComod()
void
close()
Mark this cursor as no longer being needed.protected void
invalidate()
protected void
listableChanged(CursorableLinkedList.Listable elt)
protected void
listableInserted(CursorableLinkedList.Listable elt)
protected void
listableRemoved(CursorableLinkedList.Listable elt)
int
nextIndex()
int
previousIndex()
-
Methods inherited from class org.apache.commons.collections.CursorableLinkedList.ListIter
hasNext, hasPrevious, next, previous, remove, set
-
-
-
-
Method Detail
-
previousIndex
public int previousIndex()
- Specified by:
previousIndex
in interfacejava.util.ListIterator
- Overrides:
previousIndex
in classCursorableLinkedList.ListIter
-
nextIndex
public int nextIndex()
- Specified by:
nextIndex
in interfacejava.util.ListIterator
- Overrides:
nextIndex
in classCursorableLinkedList.ListIter
-
add
public void add(java.lang.Object o)
- Specified by:
add
in interfacejava.util.ListIterator
- Overrides:
add
in classCursorableLinkedList.ListIter
-
listableRemoved
protected void listableRemoved(CursorableLinkedList.Listable elt)
-
listableInserted
protected void listableInserted(CursorableLinkedList.Listable elt)
-
listableChanged
protected void listableChanged(CursorableLinkedList.Listable elt)
-
checkForComod
protected void checkForComod()
- Overrides:
checkForComod
in classCursorableLinkedList.ListIter
-
invalidate
protected void invalidate()
-
close
public void close()
Mark this cursor as no longer being needed. Any resources associated with this cursor are immediately released. In previous versions of this class, it was mandatory to close all cursor objects to avoid memory leaks. It is no longer necessary to call this close method; an instance of this class can now be treated exactly like a normal iterator.
-
-