Package org.evoludo.util
Class RingBuffer.LstItr
- All Implemented Interfaces:
Iterator<T>
,ListIterator<T>
- Enclosing class:
RingBuffer<T>
Iterates forward over all elements in this buffer starting with the oldest
entry.
-
Field Summary
Fields inherited from class RingBuffer.FwdItr
cursor
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class RingBuffer.FwdItr
hasNext, next
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface Iterator
forEachRemaining
Methods inherited from interface ListIterator
hasNext, next
-
Constructor Details
-
LstItr
public LstItr()Creates a newListIterator
over all elements in this buffer starting with the oldest entry. -
LstItr
public LstItr(int index) Creates a newListIterator
over all elements in this buffer starting with the entry atindex
.- Parameters:
index
- the index of the first element to be returned
-
-
Method Details
-
hasPrevious
public boolean hasPrevious()- Specified by:
hasPrevious
in interfaceListIterator<T>
-
previous
- Specified by:
previous
in interfaceListIterator<T>
-
nextIndex
public int nextIndex()- Specified by:
nextIndex
in interfaceListIterator<T>
-
previousIndex
public int previousIndex()- Specified by:
previousIndex
in interfaceListIterator<T>
-
add
- Specified by:
add
in interfaceListIterator<T>
-
set
- Specified by:
set
in interfaceListIterator<T>
-
remove
public void remove()
-