GenericBatch

abstract class GenericBatch[+A] extends Batch[A]

Reusable Batch base class that can be used for implementing generators that simply modify their underlying cursor reference.

Reusable Batch base class that can be used for implementing generators that simply modify their underlying cursor reference.

class Batch[A]
trait Serializable
class Object
trait Matchable
class Any

Value members

Concrete methods

final override def collect[B](pf: PartialFunction[A, B]): Batch[B]
Definition Classes
final override def drop(n: Int): Batch[A]
Definition Classes
final override def filter(p: A => Boolean): Batch[A]
Definition Classes
final override def foldLeft[R](initial: R)(op: (R, A) => R): R
Definition Classes
final override def map[B](f: A => B): Batch[B]
Definition Classes
final override def slice(from: Int, until: Int): Batch[A]
Definition Classes
final override def take(n: Int): Batch[A]
Definition Classes
protected def transform[B](f: BatchCursor[A] => BatchCursor[B]): Batch[B]

Transforms this generator with a mapping function for the underlying BatchCursor.

Transforms this generator with a mapping function for the underlying BatchCursor.

NOTE: application of this function can be either strict or lazy (depending on the underlying generator type), but it does not modify the original collection.

  • if this generator is an Array-backed generator, the given function will be applied immediately to create a new array with an accompanying generator.
  • if this generator is backed by Iterable, then the given function will be applied lazily, on demand
Value Params
f

is the function used

Returns

a new generator with its underlying sequence transformed by the mapping function

Inherited methods

def cursor(): BatchCursor[A]
Inherited from
Batch
def toArray[B >: A](`evidence$1`: ClassTag[B]): Array[B]

Converts this generator into a standard Array.

Converts this generator into a standard Array.

Inherited from
Batch
def toIterable: Iterable[A]

Converts this generator into a Scala Iterable.

Converts this generator into a Scala Iterable.

Inherited from
Batch
def toList: List[A]

Converts this generator into a Scala immutable List.

Converts this generator into a Scala immutable List.

Inherited from
Batch