Package org.roaringbitmap
Interface IntIterator
- All Superinterfaces:
Cloneable
- All Known Subinterfaces:
PeekableIntIterator
,PeekableIntRankIterator
- All Known Implementing Classes:
BatchIntIterator
,BufferIntIteratorFlyweight
,BufferReverseIntIteratorFlyweight
,IntIteratorFlyweight
,ReverseIntIteratorFlyweight
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 Details
-
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
-