|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectit.unimi.dsi.fastutil.longs.AbstractLongIterator
it.unimi.dsi.fastutil.longs.AbstractLongBidirectionalIterator
An abstract class facilitating the creation of type-specific bidirectional iterators.
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.
Method Summary | |
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. |
Object |
previous()
Delegates to the corresponding type-specific method. |
long |
previousLong()
Delegates to the corresponding generic method. |
Methods inherited from class it.unimi.dsi.fastutil.longs.AbstractLongIterator |
next, nextLong, remove, skip |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface it.unimi.dsi.fastutil.longs.LongIterator |
nextLong, skip |
Methods inherited from interface java.util.Iterator |
hasNext, next, remove |
Methods inherited from interface it.unimi.dsi.fastutil.BidirectionalIterator |
hasPrevious |
Method Detail |
public long previousLong()
previousLong
in interface LongBidirectionalIterator
ListIterator.previous()
public Object previous()
previous
in interface BidirectionalIterator
ListIterator.previous()
public int back(int n)
previous()
for
at most n
times, stopping if BidirectionalIterator.hasPrevious()
becomes false.
back
in interface LongBidirectionalIterator
n
- the number of elements to skip back.
Iterator.next()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |