public abstract class AbstractFloatBidirectionalIterator extends AbstractFloatIterator implements FloatBidirectionalIterator
To create a type-specific bidirectional iterator, besides what is needed for an iterator you need both a method returning the previous element as primitive type and a method returning the previous element as an object. However, if you inherit from this class you need just one (anyone).
This class implements also a trivial version of back(int)
that
uses type-specific methods.
Modifier and Type | Method and Description |
---|---|
int |
back(int n)
This method just iterates the type-specific version of
previous() for
at most n times, stopping if BidirectionalIterator.hasPrevious() becomes false. |
Float |
previous()
Delegates to the corresponding type-specific method.
|
float |
previousFloat()
Delegates to the corresponding generic method.
|
next, nextFloat, remove, skip
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
nextFloat, skip
skip
hasPrevious
forEachRemaining, hasNext, next, remove
public float previousFloat()
previousFloat
in interface FloatBidirectionalIterator
ListIterator.previous()
public Float previous()
previous
in interface BidirectionalIterator<Float>
ListIterator.previous()
public int back(int n)
previous()
for
at most n
times, stopping if BidirectionalIterator.hasPrevious()
becomes false.back
in interface FloatBidirectionalIterator
back
in interface ObjectBidirectionalIterator<Float>
n
- the number of elements to skip back.Iterator.next()