chunkConstructor

zio.blocks.schema.binding.SeqConstructor.chunkConstructor

Builds a Chunk.

Attributes

Source
SeqConstructor.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Type members

Types

type Builder[A] = ChunkBuilder[A]

The mutable builder that collects the elements.

The mutable builder that collects the elements.

Attributes

Source
SeqConstructor.scala

Value members

Concrete methods

def add[A](builder: ChunkBuilder[A], a: A): Unit

Adds a to builder. For setConstructor, an element equal to one added before is dropped.

Adds a to builder. For setConstructor, an element equal to one added before is dropped.

Attributes

Source
SeqConstructor.scala
override def addBoolean(builder: ChunkBuilder[Boolean], a: Boolean): Unit

Adds the Boolean a to builder. This and the other primitive adders (addByte, addShort, addInt, addLong, addFloat, addDouble and addChar) call add by default, which boxes the value. The array-backed constructors override them to write into a primitive array without boxing, and chunkConstructor overrides all eight to forward the value to ChunkBuilder.addOne.

Adds the Boolean a to builder. This and the other primitive adders (addByte, addShort, addInt, addLong, addFloat, addDouble and addChar) call add by default, which boxes the value. The array-backed constructors override them to write into a primitive array without boxing, and chunkConstructor overrides all eight to forward the value to ChunkBuilder.addOne.

Attributes

Definition Classes
Source
SeqConstructor.scala
override def addByte(builder: ChunkBuilder[Byte], a: Byte): Unit

Attributes

Definition Classes
Source
SeqConstructor.scala
override def addChar(builder: ChunkBuilder[Char], a: Char): Unit

Attributes

Definition Classes
Source
SeqConstructor.scala
override def addDouble(builder: ChunkBuilder[Double], a: Double): Unit

Attributes

Definition Classes
Source
SeqConstructor.scala
override def addFloat(builder: ChunkBuilder[Float], a: Float): Unit

Attributes

Definition Classes
Source
SeqConstructor.scala
override def addInt(builder: ChunkBuilder[Int], a: Int): Unit

Attributes

Definition Classes
Source
SeqConstructor.scala
override def addLong(builder: ChunkBuilder[Long], a: Long): Unit

Attributes

Definition Classes
Source
SeqConstructor.scala
override def addShort(builder: ChunkBuilder[Short], a: Short): Unit

Attributes

Definition Classes
Source
SeqConstructor.scala
def empty[A](implicit ct: ClassTag[A]): Chunk[A]

Returns an empty collection.

Returns an empty collection.

Attributes

Source
SeqConstructor.scala
def newBuilder[A](sizeHint: Int)(implicit ct: ClassTag[A]): ChunkBuilder[A]

Creates an empty builder. sizeHint is the expected number of elements: the array-backed constructors use it as the initial capacity (at least 1), chunkConstructor passes it to its builder, and the others ignore it. Only the array-backed constructors use ct, to create arrays of the element type.

Creates an empty builder. sizeHint is the expected number of elements: the array-backed constructors use it as the initial capacity (at least 1), chunkConstructor passes it to its builder, and the others ignore it. Only the array-backed constructors use ct, to create arrays of the element type.

Attributes

Source
SeqConstructor.scala
def result[A](builder: ChunkBuilder[A]): Chunk[A]

Returns the collection of the elements added to builder. The array-backed constructors trim the array to the number of elements.

Returns the collection of the elements added to builder. The array-backed constructors trim the array to the number of elements.

Attributes

Source
SeqConstructor.scala