Interface BatchIterator

    • Method Summary

      Modifier and Type Method Description
      default IntIterator asIntIterator​(int[] buffer)
      Creates a wrapper around the iterator so it behaves like an IntIterator
      BatchIterator clone()
      Creates a copy of the iterator.
      boolean hasNext()
      Returns true is there are more values to get.
      int nextBatch​(int[] buffer)
      Writes the next batch of integers onto the buffer, and returns how many were written.
    • Method Detail

      • nextBatch

        int nextBatch​(int[] buffer)
        Writes the next batch of integers onto the buffer, and returns how many were written. Aims to fill the buffer.
        Parameters:
        buffer - - the target to write onto
        Returns:
        how many values were written during the call.
      • hasNext

        boolean hasNext()
        Returns true is there are more values to get.
        Returns:
        whether the iterator is exhaused or not.
      • clone

        BatchIterator clone()
        Creates a copy of the iterator.
        Returns:
        a clone of the current iterator
      • asIntIterator

        default IntIterator asIntIterator​(int[] buffer)
        Creates a wrapper around the iterator so it behaves like an IntIterator
        Parameters:
        buffer - - array to buffer bits into (size 128-256 should be best).
        Returns:
        the wrapper