Class BatchIntIterator

java.lang.Object
org.roaringbitmap.BatchIntIterator
All Implemented Interfaces:
Cloneable, IntIterator

public class BatchIntIterator extends Object implements IntIterator
Wraps a batch iterator for use as an IntIterator
  • Field Details

    • i

      private int i
    • mark

      private int mark
    • buffer

      private int[] buffer
    • delegate

      private BatchIterator delegate
  • Constructor Details

    • BatchIntIterator

      private BatchIntIterator(BatchIterator delegate, int i, int mark, int[] buffer)
    • BatchIntIterator

      BatchIntIterator(BatchIterator delegate, int[] buffer)
      Wraps the batch iterator.
      Parameters:
      delegate - the batch iterator to do the actual iteration
      buffer - the buffer
  • Method Details

    • hasNext

      public boolean hasNext()
      Specified by:
      hasNext in interface IntIterator
      Returns:
      whether there is another value
    • next

      public int next()
      Specified by:
      next in interface IntIterator
      Returns:
      next integer value
    • clone

      public IntIterator clone()
      Description copied from interface: IntIterator
      Creates a copy of the iterator.
      Specified by:
      clone in interface IntIterator
      Overrides:
      clone in class Object
      Returns:
      a clone of the current iterator