it.unimi.dsi.fastutil.floats
Interface FloatBidirectionalIterator

All Superinterfaces:
BidirectionalIterator, FloatIterator, Iterator
All Known Subinterfaces:
FloatListIterator
All Known Implementing Classes:
AbstractFloatBidirectionalIterator, AbstractFloatListIterator, Iterators.EmptyIterator

public interface FloatBidirectionalIterator
extends FloatIterator, BidirectionalIterator

A type-specific bidirectional iterator; provides an additional method to reduce type juggling, and the possibility to skip elements backwards.

See Also:
BidirectionalIterator

Method Summary
 int back(int n)
          Moves back for the given number of elements.
 float previousFloat()
          Returns the previous element as a primitive type.
 
Methods inherited from interface it.unimi.dsi.fastutil.floats.FloatIterator
nextFloat, skip
 
Methods inherited from interface java.util.Iterator
hasNext, next, remove
 
Methods inherited from interface it.unimi.dsi.fastutil.BidirectionalIterator
hasPrevious, previous
 

Method Detail

previousFloat

public float previousFloat()
Returns the previous element as a primitive type.

Returns:
the previous element from the collection.
See Also:
ListIterator.previous()

back

public int back(int n)
Moves back for the given number of elements.

The effect of this call is exactly the same as that of calling BidirectionalIterator.previous() for n times (possibly stopping if BidirectionalIterator.hasPrevious() becomes false).

Parameters:
n - the number of elements to skip back.
Returns:
the number of elements actually skipped.
See Also:
Iterator.next()