Package org.roaringbitmap
Interface IntIterator
-
- All Superinterfaces:
java.lang.Cloneable
- All Known Subinterfaces:
PeekableIntIterator
,PeekableIntRankIterator
- All Known Implementing Classes:
BatchIntIterator
,BufferIntIteratorFlyweight
,BufferReverseIntIteratorFlyweight
,IntIteratorFlyweight
,ReverseIntIteratorFlyweight
public interface IntIterator extends java.lang.Cloneable
A simple iterator over integer values. Using an IntIterator instead of Java's Iterator<Integer> avoids the overhead of the Interger class: on some tests, IntIterator is nearly twice as fast as Iterator<Integer>.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description IntIterator
clone()
Creates a copy of the iterator.boolean
hasNext()
int
next()
-
-
-
Method Detail
-
clone
IntIterator clone()
Creates a copy of the iterator.- Returns:
- a clone of the current iterator
-
hasNext
boolean hasNext()
- Returns:
- whether there is another value
-
next
int next()
- Returns:
- next integer value
-
-