Chunk

zio.Chunk
See theChunk companion class
object Chunk

Attributes

Companion
class
Graph
Supertypes
trait SeqFactory[Chunk]
trait Serializable
class Object
trait Matchable
class Any
Show all
Self type
Chunk.type

Members list

Type members

Classlikes

final case class AnyRefArray[A <: AnyRef](array: Array[A], offset: Int, length: Int) extends ChunkIterator[A]

Attributes

Supertypes
trait Product
trait ChunkIterator[A]
class Chunk[A]
trait Serializable
trait ChunkLike[A]
trait IndexedSeq[A]
trait IndexedSeqOps[A, Chunk, Chunk[A]]
trait IndexedSeq[A]
trait IndexedSeqOps[A, Chunk, Chunk[A]]
trait Seq[A]
trait SeqOps[A, Chunk, Chunk[A]]
trait Seq[A]
trait Equals
trait SeqOps[A, Chunk, Chunk[A]]
trait PartialFunction[Int, A]
trait Int => A
trait Iterable[A]
trait Iterable[A]
trait IterableOps[A, Chunk, Chunk[A]]
trait IterableOnceOps[A, Chunk, Chunk[A]]
trait IterableOnce[A]
class Object
trait Matchable
class Any
Show all
Self type
object BitChunk

Attributes

Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
BitChunk.type
final case class BooleanArray(array: Array[Boolean], offset: Int, length: Int) extends ChunkIterator[Boolean]
final case class ByteArray(array: Array[Byte], offset: Int, length: Int) extends ChunkIterator[Byte]

Attributes

Supertypes
trait Product
class Chunk[Byte]
trait Serializable
trait ChunkLike[Byte]
trait IndexedSeq[Byte]
trait IndexedSeq[Byte]
trait Seq[Byte]
trait SeqOps[Byte, Chunk, Chunk[Byte]]
trait Seq[Byte]
trait Equals
trait SeqOps[Byte, Chunk, Chunk[Byte]]
trait Int => Byte
trait Iterable[Byte]
trait Iterable[Byte]
class Object
trait Matchable
class Any
Show all
Self type
final case class CharArray(array: Array[Char], offset: Int, length: Int) extends ChunkIterator[Char]

Attributes

Supertypes
trait Product
class Chunk[Char]
trait Serializable
trait ChunkLike[Char]
trait IndexedSeq[Char]
trait IndexedSeq[Char]
trait Seq[Char]
trait SeqOps[Char, Chunk, Chunk[Char]]
trait Seq[Char]
trait Equals
trait SeqOps[Char, Chunk, Chunk[Char]]
trait Int => Char
trait Iterable[Char]
trait Iterable[Char]
class Object
trait Matchable
class Any
Show all
Self type
object ChunkIterator

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
sealed trait ChunkIterator[+A]

A ChunkIterator is a specialized iterator that supports efficient iteration over chunks. Unlike a normal iterator, the caller is responsible for providing an index with each call to hasNextAt and nextAt. By contract this should be 0 initially and incremented by 1 each time nextAt is called. This allows the caller to maintain the current index in local memory rather than the iterator having to do it on the heap for array backed chunks.

A ChunkIterator is a specialized iterator that supports efficient iteration over chunks. Unlike a normal iterator, the caller is responsible for providing an index with each call to hasNextAt and nextAt. By contract this should be 0 initially and incremented by 1 each time nextAt is called. This allows the caller to maintain the current index in local memory rather than the iterator having to do it on the heap for array backed chunks.

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class AnyRefArray[A]
class BooleanArray
class ByteArray
class CharArray
class DoubleArray
class FloatArray
class IntArray
class LongArray
class ShortArray
Show all
Self type
final case class DoubleArray(array: Array[Double], offset: Int, length: Int) extends ChunkIterator[Double]
final case class FloatArray(array: Array[Float], offset: Int, length: Int) extends ChunkIterator[Float]

Attributes

Supertypes
Self type
final case class IntArray(array: Array[Int], offset: Int, length: Int) extends ChunkIterator[Int]

Attributes

Supertypes
trait Product
class Chunk[Int]
trait Serializable
trait ChunkLike[Int]
trait IndexedSeq[Int]
trait IndexedSeq[Int]
trait Seq[Int]
trait SeqOps[Int, Chunk, Chunk[Int]]
trait Seq[Int]
trait Equals
trait SeqOps[Int, Chunk, Chunk[Int]]
trait Int => Int
trait Iterable[Int]
trait Iterable[Int]
trait IterableOnce[Int]
class Object
trait Matchable
class Any
Show all
Self type
object IsText

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
IsText.type
sealed trait IsText[-T]

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
final case class LongArray(array: Array[Long], offset: Int, length: Int) extends ChunkIterator[Long]

Attributes

Supertypes
trait Product
class Chunk[Long]
trait Serializable
trait ChunkLike[Long]
trait IndexedSeq[Long]
trait IndexedSeq[Long]
trait Seq[Long]
trait SeqOps[Long, Chunk, Chunk[Long]]
trait Seq[Long]
trait Equals
trait SeqOps[Long, Chunk, Chunk[Long]]
trait Int => Long
trait Iterable[Long]
trait Iterable[Long]
class Object
trait Matchable
class Any
Show all
Self type
final case class ShortArray(array: Array[Short], offset: Int, length: Int) extends ChunkIterator[Short]

Attributes

Supertypes
Self type

Value members

Concrete methods

override def apply[A](as: A*): Chunk[A]

Returns a chunk from a number of values.

Returns a chunk from a number of values.

Attributes

Definition Classes
override def empty[A]: Chunk[A]

Returns the empty chunk.

Returns the empty chunk.

Attributes

Definition Classes
override def fill[A](n: Int)(elem: => A): Chunk[A]

Attributes

Definition Classes
def fromArray[A](array: Array[A]): Chunk[A]

Returns a chunk backed by an array.

Returns a chunk backed by an array.

WARNING: The array must not be mutated after creating the chunk.

Attributes

def fromByteBuffer(buffer: ByteBuffer): Chunk[Byte]

Returns a chunk backed by a java.nio.ByteBuffer.

Returns a chunk backed by a java.nio.ByteBuffer.

Attributes

def fromCharBuffer(buffer: CharBuffer): Chunk[Char]

Returns a chunk backed by a java.nio.CharBuffer.

Returns a chunk backed by a java.nio.CharBuffer.

Attributes

def fromDoubleBuffer(buffer: DoubleBuffer): Chunk[Double]

Returns a chunk backed by a java.nio.DoubleBuffer.

Returns a chunk backed by a java.nio.DoubleBuffer.

Attributes

def fromFloatBuffer(buffer: FloatBuffer): Chunk[Float]

Returns a chunk backed by a java.nio.FloatBuffer.

Returns a chunk backed by a java.nio.FloatBuffer.

Attributes

def fromIntBuffer(buffer: IntBuffer): Chunk[Int]

Returns a chunk backed by a java.nio.IntBuffer.

Returns a chunk backed by a java.nio.IntBuffer.

Attributes

def fromIterable[A](it: Iterable[A]): Chunk[A]

Returns a chunk backed by an iterable.

Returns a chunk backed by an iterable.

Attributes

def fromIterator[A](iterator: Iterator[A]): Chunk[A]

Creates a chunk from an iterator.

Creates a chunk from an iterator.

Attributes

def fromJavaIterable[A](iterable: Iterable[A]): Chunk[A]

Returns a chunk backed by a Java iterable.

Returns a chunk backed by a Java iterable.

Attributes

def fromJavaIterator[A](iterator: Iterator[A]): Chunk[A]

Creates a chunk from a Java iterator.

Creates a chunk from a Java iterator.

Attributes

def fromLongBuffer(buffer: LongBuffer): Chunk[Long]

Returns a chunk backed by a java.nio.LongBuffer.

Returns a chunk backed by a java.nio.LongBuffer.

Attributes

def fromShortBuffer(buffer: ShortBuffer): Chunk[Short]

Returns a chunk backed by a java.nio.ShortBuffer.

Returns a chunk backed by a java.nio.ShortBuffer.

Attributes

override def iterate[A](start: A, len: Int)(f: A => A): Chunk[A]

Attributes

Definition Classes
def single[A](a: A): Chunk[A]

Returns a singleton chunk, eagerly evaluated.

Returns a singleton chunk, eagerly evaluated.

Attributes

def succeed[A](a: A): Chunk[A]

Alias for Chunk.single.

Alias for Chunk.single.

Attributes

def unfold[S, A](s: S)(f: S => Option[(A, S)]): Chunk[A]

Constructs a Chunk by repeatedly applying the function f as long as it returns Some.

Constructs a Chunk by repeatedly applying the function f as long as it returns Some.

Attributes

def unfoldZIO[R, E, A, S](s: S)(f: S => ZIO[R, E, Option[(A, S)]])(implicit trace: Trace): ZIO[R, E, Chunk[A]]

Constructs a Chunk by repeatedly applying the effectual function f as long as it returns Some.

Constructs a Chunk by repeatedly applying the effectual function f as long as it returns Some.

Attributes

Inherited methods

override def concat[A](xss: Iterable[A]*): Chunk[A]

Attributes

Definition Classes
Inherited from:
StrictOptimizedSeqFactory
def fill[A](n1: Int, n2: Int, n3: Int, n4: Int, n5: Int)(elem: => A): Chunk[Chunk[Chunk[Chunk[Chunk[A]]]]]

Attributes

Inherited from:
IterableFactory
def fill[A](n1: Int, n2: Int, n3: Int, n4: Int)(elem: => A): Chunk[Chunk[Chunk[Chunk[A]]]]

Attributes

Inherited from:
IterableFactory
def fill[A](n1: Int, n2: Int, n3: Int)(elem: => A): Chunk[Chunk[Chunk[A]]]

Attributes

Inherited from:
IterableFactory
def fill[A](n1: Int, n2: Int)(elem: => A): Chunk[Chunk[A]]

Attributes

Inherited from:
IterableFactory
final def from[A](source: IterableOnce[A]): Chunk[A]

Attributes

Inherited from:
ChunkFactory (hidden)
def range[A : Integral](start: A, end: A, step: A): Chunk[A]

Attributes

Inherited from:
IterableFactory
def range[A : Integral](start: A, end: A): Chunk[A]

Attributes

Inherited from:
IterableFactory
override def tabulate[A](n: Int)(f: Int => A): Chunk[A]

Attributes

Definition Classes
Inherited from:
StrictOptimizedSeqFactory
def tabulate[A](n1: Int, n2: Int, n3: Int, n4: Int, n5: Int)(f: (Int, Int, Int, Int, Int) => A): Chunk[Chunk[Chunk[Chunk[Chunk[A]]]]]

Attributes

Inherited from:
IterableFactory
def tabulate[A](n1: Int, n2: Int, n3: Int, n4: Int)(f: (Int, Int, Int, Int) => A): Chunk[Chunk[Chunk[Chunk[A]]]]

Attributes

Inherited from:
IterableFactory
def tabulate[A](n1: Int, n2: Int, n3: Int)(f: (Int, Int, Int) => A): Chunk[Chunk[Chunk[A]]]

Attributes

Inherited from:
IterableFactory
def tabulate[A](n1: Int, n2: Int)(f: (Int, Int) => A): Chunk[Chunk[A]]

Attributes

Inherited from:
IterableFactory
final def unapplySeq[A](x: Chunk[A]): UnapplySeqWrapper[A]

Attributes

Inherited from:
SeqFactory

Concrete fields

val unit: Chunk[Unit]

The unit chunk

The unit chunk

Attributes

Implicits

Inherited implicits

implicit def iterableFactory[A]: Factory[A, Chunk[A]]

Attributes

Inherited from:
IterableFactory