Class SplittableIterator<T>

    • Constructor Detail

      • SplittableIterator

        public SplittableIterator()
    • Method Detail

      • split

        public abstract Iterator<T>[] split​(int numPartitions)
        Splits this iterator into a number disjoint iterators. The union of these iterators returns the original iterator values.
        Parameters:
        numPartitions - The number of iterators to split into.
        Returns:
        An array with the split iterators.
      • getSplit

        public Iterator<T> getSplit​(int num,
                                    int numPartitions)
        Splits this iterator into n partitions and returns the i-th partition out of those.
        Parameters:
        num - The partition to return (i).
        numPartitions - The number of partitions to split into (n).
        Returns:
        The iterator for the partition.
      • getMaximumNumberOfSplits

        public abstract int getMaximumNumberOfSplits()
        The maximum number of splits into which this iterator can be split up.
        Returns:
        The maximum number of splits into which this iterator can be split up.