Chunk

zio.Chunk$
See theChunk companion class
object Chunk

Attributes

Companion:
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Chunk.type

Members list

Concise view

Type members

Classlikes

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

Attributes

Graph
Supertypes
trait Product
trait ChunkIterator[A]
class Chunk[A]
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 Int => A
trait Iterable[A]
trait Iterable[A]
trait IterableOps[A, Chunk, Chunk[A]]
trait IterableOnce[A]
class Object
trait Matchable
class Any
Self type
object BitChunk

Attributes

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

Attributes

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

Attributes

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

Attributes

Graph
Supertypes
Self type

Attributes

Companion:
trait
Graph
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
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
Self type
final case class DoubleArray(array: Array[Double], offset: Int, length: Int) extends ChunkIterator[Double]

Attributes

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

Attributes

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

Attributes

Graph
Supertypes
Self type
object IsText

Attributes

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

Attributes

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

Attributes

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

Attributes

Graph
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

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

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

Attributes

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

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

Attributes

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

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

Attributes

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

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

Attributes

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

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

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

Attributes

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

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

Attributes

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]*): CC[A]

Attributes

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

Attributes

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

Attributes

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

Attributes

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

Attributes

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

Attributes

Inherited from:
ChunkFactory (hidden)
def iterate[A](start: A, len: Int)(f: A => A): CC[A]

Attributes

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

Attributes

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

Attributes

Inherited from:
IterableFactory
override def tabulate[A](n: Int)(f: Int => A): CC[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): CC[CC[CC[CC[CC[A]]]]]

Attributes

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

Attributes

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

Attributes

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

Attributes

Inherited from:
IterableFactory

Attributes

Inherited from:
SeqFactory

Concrete fields

The unit chunk

The unit chunk

Attributes

Implicits

Inherited implicits

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

Attributes

Inherited from:
IterableFactory