Class LongValueSequenceIterator

    • Constructor Detail

      • LongValueSequenceIterator

        public LongValueSequenceIterator​(long from,
                                         long to)
        Creates a new splittable iterator, returning the range [from, to]. Both boundaries of the interval are inclusive.
        Parameters:
        from - The first number returned by the iterator.
        to - The last number returned by the iterator.
    • Method Detail

      • getCurrent

        public long getCurrent()
      • getTo

        public long getTo()
      • hasNext

        public boolean hasNext()
      • remove

        public void remove()
      • split

        public LongValueSequenceIterator[] split​(int numPartitions)
        Description copied from class: SplittableIterator
        Splits this iterator into a number disjoint iterators. The union of these iterators returns the original iterator values.
        Specified by:
        split in class SplittableIterator<LongValue>
        Parameters:
        numPartitions - The number of iterators to split into.
        Returns:
        An array with the split iterators.
      • getMaximumNumberOfSplits

        public int getMaximumNumberOfSplits()
        Description copied from class: SplittableIterator
        The maximum number of splits into which this iterator can be split up.
        Specified by:
        getMaximumNumberOfSplits in class SplittableIterator<LongValue>
        Returns:
        The maximum number of splits into which this iterator can be split up.