|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectit.unimi.dsi.fastutil.ints.AbstractIntIterator
An abstract class facilitating the creation of type-specific iterators.
To create a type-specific iterator you need both a method returning the
next element as primitive type and a method returning the next element as an
object. However, if you inherit from this class you need just one (anyone).
Moreover, remove()
will throw an UnsupportedOperationException
.
This class implements also a trivial version of skip()
.
Iterator
Method Summary | |
Object |
next()
This method just invokes the type-specific version. |
int |
nextInt()
This method just invokes the generic version. |
void |
remove()
This method just throws an UnsupportedOperationException . |
int |
skip(int n)
This method just iterates Iterator.next() for at most
n times, stopping if Iterator.hasNext()
becomes false. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.util.Iterator |
hasNext |
Method Detail |
public int nextInt()
nextInt
in interface IntIterator
Iterator.next()
public Object next()
next
in interface Iterator
public void remove()
UnsupportedOperationException
.
remove
in interface Iterator
public int skip(int n)
Iterator.next()
for at most
n
times, stopping if Iterator.hasNext()
becomes false.
skip
in interface IntIterator
n
- the number of elements to skip.
Iterator.next()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |