Interface LongIterator

  • All Superinterfaces:
    Cloneable
    All Known Subinterfaces:
    PeekableLongIterator

    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 Detail

      • 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