Interface IntIterator

All Superinterfaces:
Cloneable
All Known Subinterfaces:
PeekableIntIterator, PeekableIntRankIterator
All Known Implementing Classes:
BatchIntIterator, BufferIntIteratorFlyweight, BufferReverseIntIteratorFlyweight, IntIteratorFlyweight, ReverseIntIteratorFlyweight

public interface IntIterator extends 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

    Modifier and Type
    Method
    Description
    Creates a copy of the iterator.
    boolean
     
    int
     
  • 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