Class IndexIterators

  • public class IndexIterators
    extends Object
    A class providing static methods and objects that do useful things with index iterators.
    • Field Detail

    • Constructor Detail

      • IndexIterators

        protected IndexIterators()
    • Method Detail

      • positionArray

        public static int[] positionArray​(IndexIterator indexIterator,
                                          int[] position)
                                   throws IOException
        Writes the positions of an index iterator into an array; if the array is not large enough, it will be reallocated using IntArrays.grow(int[], int).

        Note that this method just iterates IndexIterator.nextPosition(). If the method has already been called, the positions that have been already returned will be missing.

        position, if it was large enough to contain all positions; a new, larger array otherwise.