final class LongsBatch extends Batch[Long]
Batch implementation specialized for Long.
Under the hood it uses an ArrayBatch
implementation, which is @specialized. Using LongsBatch
might be desirable instead for isInstanceOf checks.
- Source
- LongsBatch.scala
- Alphabetic
- By Inheritance
- LongsBatch
- Batch
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new LongsBatch(underlying: ArrayBatch[Long])
Value Members
- def collect[B](pf: PartialFunction[Long, B]): ArrayBatch[B]
Creates a generator by transforming values produced by the source with a partial function, dropping those values for which the partial function is not defined.
Creates a generator by transforming values produced by the source with a partial function, dropping those values for which the partial function is not defined.
- pf
the partial function which filters and maps the generator.
- returns
a new generator which yields each value
xproduced by this generator for whichpfis defined
- Definition Classes
- LongsBatch → Batch
- def cursor(): LongsCursor
- Definition Classes
- LongsBatch → Batch
- def drop(n: Int): LongsBatch
Creates a new generator from the source, with the first
nelements dropped, of ifnis higher than the length of the underlying collection, the it mirrors the source, whichever applies.Creates a new generator from the source, with the first
nelements dropped, of ifnis higher than the length of the underlying collection, the it mirrors the source, whichever applies.- Definition Classes
- LongsBatch → Batch
- def filter(p: (Long) => Boolean): LongsBatch
Returns a generator over all the elements of the source that satisfy the predicate
p.Returns a generator over all the elements of the source that satisfy the predicate
p. The order of the elements is preserved.- p
the predicate used to test values.
- returns
a generator which produces those values of the source which satisfy the predicate
p.
- Definition Classes
- LongsBatch → Batch
- def foldLeft[R](initial: R)(op: (R, Long) => R): R
Applies a binary operator to a start value and all elements of this generator, going left to right.
Applies a binary operator to a start value and all elements of this generator, going left to right.
- R
is the result type of the binary operator.
- initial
is the start value.
- op
the binary operator to apply
- returns
the result of inserting
opbetween consecutive elements of this generator, going left to right with the start valueinitialon the left. Returnsinitialif the generator is empty.
- Definition Classes
- LongsBatch → Batch
- def map[B](f: (Long) => B): ArrayBatch[B]
Creates a new generator that maps all values produced by the source to new values using a transformation function.
Creates a new generator that maps all values produced by the source to new values using a transformation function.
- f
is the transformation function
- returns
a new generator which transforms every value produced by the source by applying the function
fto it.
- Definition Classes
- LongsBatch → Batch
- def slice(from: Int, until: Int): LongsBatch
Creates a new generator emitting an interval of the values produced by the source.
Creates a new generator emitting an interval of the values produced by the source.
- from
the index of the first generated element which forms part of the slice.
- until
the index of the first element following the slice.
- returns
a generator which emits the element of the source past the first
fromelements usingdrop, and then takesuntil - fromelements, usingtake
- Definition Classes
- LongsBatch → Batch
- def take(n: Int): LongsBatch
Creates a new generator that will only return the first
nelements of the source.Creates a new generator that will only return the first
nelements of the source.- Definition Classes
- LongsBatch → Batch
- def toArray[B >: Long](implicit arg0: ClassTag[B]): Array[B]
Converts this generator into a standard
Array.Converts this generator into a standard
Array.- Definition Classes
- Batch
- def toIterable: Iterable[Long]
Converts this generator into a Scala
Iterable.Converts this generator into a Scala
Iterable.- Definition Classes
- Batch
- def toList: List[Long]
Converts this generator into a Scala immutable
List.Converts this generator into a Scala immutable
List.- Definition Classes
- Batch

This is the API documentation for the Monix library.
Package Overview
monix.execution exposes lower level primitives for dealing with asynchronous execution:
Atomictypes, as alternative tojava.util.concurrent.atomicmonix.catnap exposes pure abstractions built on top of the Cats-Effect type classes:
monix.eval is for dealing with evaluation of results, thus exposing Task and Coeval.
monix.reactive exposes the
Observablepattern:Observableimplementationsmonix.tail exposes Iterant for purely functional pull based streaming:
BatchandBatchCursor, the alternatives to Scala'sIterableandIteratorrespectively that we are using within Iterant's encodingYou can control evaluation with type you choose - be it Task, Coeval, cats.effect.IO or your own as long as you provide correct cats-effect or cats typeclass instance.