Package org.apache.commons.pool.impl
Class CursorableLinkedList.Cursor
- java.lang.Object
-
- org.apache.commons.pool.impl.CursorableLinkedList.ListIter
-
- org.apache.commons.pool.impl.CursorableLinkedList.Cursor
-
- All Implemented Interfaces:
java.util.Iterator<E>,java.util.ListIterator<E>
- Enclosing class:
- CursorableLinkedList<E>
public class CursorableLinkedList.Cursor extends CursorableLinkedList.ListIter implements java.util.ListIterator<E>
-
-
Field Summary
Fields Modifier and Type Field Description (package private) boolean_valid-
Fields inherited from class org.apache.commons.pool.impl.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 voidadd(E o)protected voidcheckForComod()voidclose()Mark this cursor as no longer being needed.protected voidinvalidate()protected voidlistableChanged(CursorableLinkedList.Listable<E> elt)protected voidlistableInserted(CursorableLinkedList.Listable<E> elt)protected voidlistableRemoved(CursorableLinkedList.Listable<E> elt)intnextIndex()intpreviousIndex()-
Methods inherited from class org.apache.commons.pool.impl.CursorableLinkedList.ListIter
hasNext, hasPrevious, next, previous, remove, set
-
-
-
-
Method Detail
-
previousIndex
public int previousIndex()
- Specified by:
previousIndexin interfacejava.util.ListIterator<E>- Overrides:
previousIndexin classCursorableLinkedList.ListIter
-
nextIndex
public int nextIndex()
- Specified by:
nextIndexin interfacejava.util.ListIterator<E>- Overrides:
nextIndexin classCursorableLinkedList.ListIter
-
add
public void add(E o)
- Specified by:
addin interfacejava.util.ListIterator<E>- Overrides:
addin classCursorableLinkedList.ListIter
-
listableRemoved
protected void listableRemoved(CursorableLinkedList.Listable<E> elt)
-
listableInserted
protected void listableInserted(CursorableLinkedList.Listable<E> elt)
-
listableChanged
protected void listableChanged(CursorableLinkedList.Listable<E> elt)
-
checkForComod
protected void checkForComod()
- Overrides:
checkForComodin 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.
-
-