Interface LongIterator

All Superinterfaces:
Cloneable
All Known Subinterfaces:
PeekableLongIterator
All Known Implementing Classes:
Roaring64Bitmap.ForwardPeekableIterator, Roaring64Bitmap.PeekableIterator, Roaring64Bitmap.ReversePeekableIterator

public interface LongIterator extends Cloneable
A simple iterator over long values. Using an IntIterator instead of Java's Iterator<Long> avoids the overhead of the Long class: on some tests, LongIterator is nearly twice as fast as Iterator<Long>.
  • Method Summary

    Modifier and Type
    Method
    Description
    Creates a copy of the iterator.
    boolean
     
    long
     
  • Method Details

    • clone

      LongIterator clone()
      Creates a copy of the iterator.
      Returns:
      a clone of the current iterator
    • hasNext

      boolean hasNext()
      Returns:
      whether there is another value
    • next

      long next()
      Returns:
      next long value