IterableSplitter

trait IterableSplitter[+T] extends AugmentedIterableIterator[T] with Splitter[T] with Signalling with DelegatedSignalling

Parallel iterators allow splitting and provide a remaining method to obtain the number of elements remaining in the iterator.

Parallel iterators allow splitting and provide a remaining method to obtain the number of elements remaining in the iterator.

Type Params
T

type of the elements iterated.

trait Splitter[T]
trait AugmentedIterableIterator[T]
trait RemainsIterator[T]
trait Iterator[T]
trait IterableOnceOps[T, [A] =>> Iterator[A], Iterator[T]]
trait IterableOnce[T]
class Object
trait Matchable
class Any

Type members

Classlikes

class Appended[U >: T, PI <: IterableSplitter[U]](val that: PI) extends IterableSplitter[U]
class Mapped[S](f: T => S) extends IterableSplitter[S]
class Taken(taken: Int) extends IterableSplitter[T]
class Zipped[S](val that: SeqSplitter[S]) extends IterableSplitter[(T, S)]
class ZippedAll[U >: T, S](val that: SeqSplitter[S], val thiselem: U, val thatelem: S) extends IterableSplitter[(U, S)]

Inherited classlikes

class GroupedIterator[B >: A]
Inherited from
Iterator

Value members

Abstract methods

Creates a copy of this iterator.

Creates a copy of this iterator.

def remaining: Int

The number of elements this iterator has yet to traverse. This method doesn't change the state of the iterator.

The number of elements this iterator has yet to traverse. This method doesn't change the state of the iterator.

This method is used to provide size hints to builders and combiners, and to approximate positions of iterators within a data structure.

'''Note''': This method may be implemented to return an upper bound on the number of elements in the iterator, instead of the exact number of elements to iterate. Parallel collections which have such iterators are called non-strict-splitter collections.

In that case, 2 considerations must be taken into account:

  1. classes that inherit ParIterable must reimplement methods take, drop, slice, splitAt, copyToArray and all others using this information.

  2. if an iterator provides an upper bound on the number of elements, then after splitting the sum of remaining values of split iterators must be less than or equal to this upper bound.

def split: Seq[IterableSplitter[T]]

Concrete methods

def appendParIterable[U >: T, PI <: IterableSplitter[U]](that: PI): Appended[U, PI]
protected def buildString(closure: String => Unit => Unit): String
override def drop(n: Int): IterableSplitter[T]

Drop implemented as simple eager consumption.

Drop implemented as simple eager consumption.

Definition Classes
Iterator -> IterableOnceOps
override def map[S](f: T => S): IterableSplitter[S]
Definition Classes
Iterator -> IterableOnceOps
def shouldSplitFurther[S](coll: ParIterable[S], parallelismLevel: Int): Boolean
override def slice(from1: Int, until1: Int): IterableSplitter[T]
Definition Classes
Iterator -> IterableOnceOps
override def take(n: Int): IterableSplitter[T]
Definition Classes
Iterator -> IterableOnceOps
def zipAllParSeq[S, U >: T, R >: S](that: SeqSplitter[S], thisElem: U, thatElem: R): ZippedAll[U, R]
def zipParSeq[S](that: SeqSplitter[S]): IterableSplitter[(T, S)]

Inherited methods

@inline
final def ++[B >: T](xs: => IterableOnce[B]): Iterator[B]
Inherited from
Iterator
def abort(): Unit
Inherited from
DelegatedSignalling
@inline
final def addString(b: StringBuilder): StringBuilder
Inherited from
IterableOnceOps
@inline
final def addString(b: StringBuilder, sep: String): StringBuilder
Inherited from
IterableOnceOps
def addString(b: StringBuilder, start: String, sep: String, end: String): StringBuilder
Inherited from
IterableOnceOps
def buffered: BufferedIterator[T]
Inherited from
Iterator
def collect[B](pf: PartialFunction[T, B]): Iterator[B]
Inherited from
Iterator
def collect2combiner[S, That](pf: PartialFunction[T, S], cb: Combiner[S, That]): Combiner[S, That]
Inherited from
AugmentedIterableIterator
def collectFirst[B](pf: PartialFunction[T, B]): Option[B]
Inherited from
IterableOnceOps
def concat[B >: T](xs: => IterableOnce[B]): Iterator[B]
Inherited from
Iterator
def contains(elem: Any): Boolean
Inherited from
Iterator
def copy2builder[U >: T, Coll, Bld <: Builder[U, Coll]](b: Bld): Bld
Inherited from
AugmentedIterableIterator
def copyToArray[B >: T](xs: Array[B], start: Int, len: Int): Int
Inherited from
IterableOnceOps
@deprecatedOverriding("This should always forward to the 3-arg version of this method", "2.13.4")
def copyToArray[B >: T](xs: Array[B], start: Int): Int
Inherited from
IterableOnceOps
@deprecatedOverriding("This should always forward to the 3-arg version of this method", "2.13.4")
def copyToArray[B >: T](xs: Array[B]): Int
Inherited from
IterableOnceOps
def corresponds[B](that: IterableOnce[B])(p: (T, B) => Boolean): Boolean
Inherited from
IterableOnceOps
override def count(p: T => Boolean): Int
Definition Classes
AugmentedIterableIterator -> IterableOnceOps
Inherited from
AugmentedIterableIterator
def distinct: Iterator[T]
Inherited from
Iterator
def distinctBy[B](f: T => B): Iterator[T]
Inherited from
Iterator
def drop2combiner[U >: T, This](n: Int, cb: Combiner[U, This]): Combiner[U, This]
Inherited from
AugmentedIterableIterator
def dropWhile(p: T => Boolean): Iterator[T]
Inherited from
Iterator
def duplicate: (Iterator[T], Iterator[T])
Inherited from
Iterator
def exists(p: T => Boolean): Boolean
Inherited from
IterableOnceOps
def filter(p: T => Boolean): Iterator[T]
Inherited from
Iterator
def filter2combiner[U >: T, This](pred: T => Boolean, cb: Combiner[U, This]): Combiner[U, This]
Inherited from
AugmentedIterableIterator
def filterNot(p: T => Boolean): Iterator[T]
Inherited from
Iterator
def filterNot2combiner[U >: T, This](pred: T => Boolean, cb: Combiner[U, This]): Combiner[U, This]
Inherited from
AugmentedIterableIterator
def find(p: T => Boolean): Option[T]
Inherited from
IterableOnceOps
def flatMap[B](f: T => IterableOnce[B]): Iterator[B]
Inherited from
Iterator
def flatmap2combiner[S, That](f: T => IterableOnce[S], cb: Combiner[S, That]): Combiner[S, That]
Inherited from
AugmentedIterableIterator
def flatten[B](ev: T => IterableOnce[B]): Iterator[B]
Inherited from
Iterator
override def fold[U >: T](z: U)(op: (U, U) => U): U
Definition Classes
AugmentedIterableIterator -> IterableOnceOps
Inherited from
AugmentedIterableIterator
def foldLeft[B](z: B)(op: (B, T) => B): B
Inherited from
IterableOnceOps
def foldRight[B](z: B)(op: (T, B) => B): B
Inherited from
IterableOnceOps
def forall(p: T => Boolean): Boolean
Inherited from
IterableOnceOps
def foreach[U](f: T => U): Unit
Inherited from
IterableOnceOps
def grouped[B >: T](size: Int): GroupedIterator[B]
Inherited from
Iterator
def hasNext: Boolean
Inherited from
Iterator
def indexFlag: Int
Inherited from
DelegatedSignalling
def indexOf[B >: T](elem: B, from: Int): Int
Inherited from
Iterator
def indexOf[B >: T](elem: B): Int
Inherited from
Iterator
def indexWhere(p: T => Boolean, from: Int): Int
Inherited from
Iterator
def isAborted: Boolean
Inherited from
DelegatedSignalling
@deprecatedOverriding("isEmpty is defined as !hasNext; override hasNext instead", "2.13.0")
override def isEmpty: Boolean
Definition Classes
Iterator -> IterableOnceOps
Inherited from
Iterator
def isRemainingCheap: Boolean

For most collections, this is a cheap operation. Exceptions can override this method.

For most collections, this is a cheap operation. Exceptions can override this method.

Inherited from
RemainsIterator
def isTraversableAgain: Boolean
Inherited from
IterableOnceOps
@inline
final def iterator: Iterator[T]
Inherited from
Iterator
def knownSize: Int
Inherited from
IterableOnce
@inline
final def length: Int
Inherited from
Iterator
def map2combiner[S, That](f: T => S, cb: Combiner[S, That]): Combiner[S, That]
Inherited from
AugmentedIterableIterator
override def max[U >: T](ord: Ordering[U]): T
Definition Classes
AugmentedIterableIterator -> IterableOnceOps
Inherited from
AugmentedIterableIterator
def maxBy[B](f: T => B)(cmp: Ordering[B]): T
Inherited from
IterableOnceOps
def maxByOption[B](f: T => B)(cmp: Ordering[B]): Option[T]
Inherited from
IterableOnceOps
def maxOption[B >: T](ord: Ordering[B]): Option[T]
Inherited from
IterableOnceOps
override def min[U >: T](ord: Ordering[U]): T
Definition Classes
AugmentedIterableIterator -> IterableOnceOps
Inherited from
AugmentedIterableIterator
def minBy[B](f: T => B)(cmp: Ordering[B]): T
Inherited from
IterableOnceOps
def minByOption[B](f: T => B)(cmp: Ordering[B]): Option[T]
Inherited from
IterableOnceOps
def minOption[B >: T](ord: Ordering[B]): Option[T]
Inherited from
IterableOnceOps
@inline
final def mkString: String
Inherited from
IterableOnceOps
@inline
final def mkString(sep: String): String
Inherited from
IterableOnceOps
final def mkString(start: String, sep: String, end: String): String
Inherited from
IterableOnceOps
@throws(scala.this.throws.$lessinit$greater$default$1[scala.NoSuchElementException])
def next(): T
Inherited from
Iterator
def nextOption(): Option[T]
Inherited from
Iterator
@deprecatedOverriding("nonEmpty is defined as !isEmpty; override isEmpty instead", "2.13.0")
def nonEmpty: Boolean
Inherited from
IterableOnceOps
def padTo[B >: T](len: Int, elem: B): Iterator[B]
Inherited from
Iterator
def partition(p: T => Boolean): (Iterator[T], Iterator[T])
Inherited from
Iterator
def partition2combiners[U >: T, This](pred: T => Boolean, btrue: Combiner[U, This], bfalse: Combiner[U, This]): (Combiner[U, This], Combiner[U, This])
Inherited from
AugmentedIterableIterator
def patch[B >: T](from: Int, patchElems: Iterator[B], replaced: Int): Iterator[B]
Inherited from
Iterator
override def product[U >: T](num: Numeric[U]): U
Definition Classes
AugmentedIterableIterator -> IterableOnceOps
Inherited from
AugmentedIterableIterator
override def reduce[U >: T](op: (U, U) => U): U
Definition Classes
AugmentedIterableIterator -> IterableOnceOps
Inherited from
AugmentedIterableIterator
def reduceLeft[B >: T](op: (B, T) => B): B
Inherited from
IterableOnceOps
def reduceLeft[U >: T](howmany: Int, op: (U, U) => U): U
Inherited from
AugmentedIterableIterator
def reduceLeftOption[B >: T](op: (B, T) => B): Option[B]
Inherited from
IterableOnceOps
def reduceOption[B >: T](op: (B, B) => B): Option[B]
Inherited from
IterableOnceOps
def reduceRight[B >: T](op: (T, B) => B): B
Inherited from
IterableOnceOps
def reduceRightOption[B >: T](op: (T, B) => B): Option[B]
Inherited from
IterableOnceOps
protected def reversed: Iterable[T]
Inherited from
IterableOnceOps
def sameElements[B >: T](that: IterableOnce[B]): Boolean
Inherited from
Iterator
def scanLeft[B](z: B)(op: (B, T) => B): Iterator[B]
Inherited from
Iterator
def scanToArray[U >: T, A >: U](z: U, op: (U, U) => U, array: Array[A], from: Int): Unit
Inherited from
AugmentedIterableIterator
def scanToCombiner[U >: T, That](howmany: Int, startValue: U, op: (U, U) => U, cb: Combiner[U, That]): Combiner[U, That]
Inherited from
AugmentedIterableIterator
def scanToCombiner[U >: T, That](startValue: U, op: (U, U) => U, cb: Combiner[U, That]): Combiner[U, That]
Inherited from
AugmentedIterableIterator
def setIndexFlag(f: Int): Unit
Inherited from
DelegatedSignalling
def setIndexFlagIfGreater(f: Int): Unit
Inherited from
DelegatedSignalling
def setIndexFlagIfLesser(f: Int): Unit
Inherited from
DelegatedSignalling
def size: Int
Inherited from
IterableOnceOps
def slice2combiner[U >: T, This](from: Int, until: Int, cb: Combiner[U, This]): Combiner[U, This]
Inherited from
AugmentedIterableIterator
def sliding[B >: T](size: Int, step: Int): GroupedIterator[B]
Inherited from
Iterator
def span(p: T => Boolean): (Iterator[T], Iterator[T])
Inherited from
Iterator
def span2combiners[U >: T, This](p: T => Boolean, before: Combiner[U, This], after: Combiner[U, This]): (Combiner[U, This], Combiner[U, This])
Inherited from
AugmentedIterableIterator
def splitAt(n: Int): (Iterator[T], Iterator[T])
Inherited from
IterableOnceOps
def splitAt2combiners[U >: T, This](at: Int, before: Combiner[U, This], after: Combiner[U, This]): (Combiner[U, This], Combiner[U, This])
Inherited from
AugmentedIterableIterator
def stepper[S <: Stepper[_]](shape: StepperShape[T, S]): S
Inherited from
IterableOnce
override def sum[U >: T](num: Numeric[U]): U
Definition Classes
AugmentedIterableIterator -> IterableOnceOps
Inherited from
AugmentedIterableIterator
def tag: Int
Inherited from
DelegatedSignalling
def take2combiner[U >: T, This](n: Int, cb: Combiner[U, This]): Combiner[U, This]
Inherited from
AugmentedIterableIterator
def takeWhile(p: T => Boolean): Iterator[T]
Inherited from
Iterator
def takeWhile2combiner[U >: T, This](p: T => Boolean, cb: Combiner[U, This]): (Combiner[U, This], Boolean)
Inherited from
AugmentedIterableIterator
override def tapEach[U](f: T => U): Iterator[T]
Definition Classes
Iterator -> IterableOnceOps
Inherited from
Iterator
def to[C1](factory: Factory[T, C1]): C1
Inherited from
IterableOnceOps
def toArray[B >: T](ClassTag[B]): Array[B]
Inherited from
IterableOnceOps
@inline
final def toBuffer[B >: T]: Buffer[B]
Inherited from
IterableOnceOps
def toIndexedSeq: IndexedSeq[T]
Inherited from
IterableOnceOps
def toList: List[T]
Inherited from
IterableOnceOps
def toMap[K, V](ev: T <:< (K, V)): Map[K, V]
Inherited from
IterableOnceOps
def toSeq: Seq[T]
Inherited from
IterableOnceOps
def toSet[B >: T]: Set[B]
Inherited from
IterableOnceOps
override def toString(): String
Definition Classes
Iterator -> Any
Inherited from
Iterator
def toVector: Vector[T]
Inherited from
IterableOnceOps
def withFilter(p: T => Boolean): Iterator[T]
Inherited from
Iterator
def zip[B](that: IterableOnce[B]): Iterator[(T, B)]
Inherited from
Iterator
def zip2combiner[U >: T, S, That](otherpit: RemainsIterator[S], cb: Combiner[(U, S), That]): Combiner[(U, S), That]
Inherited from
AugmentedIterableIterator
def zipAll[A1 >: T, B](that: IterableOnce[B], thisElem: A1, thatElem: B): Iterator[(A1, B)]
Inherited from
Iterator
def zipAll2combiner[U >: T, S, That](that: RemainsIterator[S], thiselem: U, thatelem: S, cb: Combiner[(U, S), That]): Combiner[(U, S), That]
Inherited from
AugmentedIterableIterator
def zipWithIndex: Iterator[(T, Int)]
Inherited from
Iterator

Deprecated and Inherited methods

@inline @deprecated("Use foldLeft instead of /:", "2.13.0")
final def /:[B](z: B)(op: (B, T) => B): B
Deprecated
Inherited from
IterableOnceOps
@inline @deprecated("Use foldRight instead of :\\", "2.13.0")
final def :\[B](z: B)(op: (T, B) => B): B
Deprecated
Inherited from
IterableOnceOps
@deprecated("`aggregate` is not relevant for sequential collections. Use `foldLeft(z)(seqop)` instead.", "2.13.0")
def aggregate[B](z: => B)(seqop: (B, T) => B, combop: (B, B) => B): B
Deprecated
Inherited from
IterableOnceOps
@inline @deprecated("Use `dest ++= coll` instead", "2.13.0")
final def copyToBuffer[B >: T](dest: Buffer[B]): Unit
Deprecated
Inherited from
IterableOnceOps
@inline @deprecated("hasDefiniteSize on Iterator is the same as isEmpty", "2.13.0")
final override def hasDefiniteSize: Boolean
Deprecated
Definition Classes
Iterator -> IterableOnceOps
Inherited from
Iterator
@deprecated("Call scanRight on an Iterable instead.", "2.13.0")
def scanRight[B](z: B)(op: (T, B) => B): Iterator[B]
Deprecated
Inherited from
Iterator
@deprecated("Iterator.seq always returns the iterator itself", "2.13.0")
Deprecated
Inherited from
Iterator
@inline @deprecated("Use .iterator instead of .toIterator", "2.13.0")
final def toIterator: Iterator[T]
Deprecated
Inherited from
IterableOnceOps
@inline @deprecated("Use .to(LazyList) instead of .toStream", "2.13.0")
final def toStream: Stream[T]
Deprecated
Inherited from
IterableOnceOps

Concrete fields