setConstructor

zio.blocks.schema.binding.SeqConstructor.setConstructor
object setConstructor extends SeqConstructor[Set]

Builds an immutable Set.

Attributes

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

Members list

Type members

Types

type Builder[A] = Builder[A, Set[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: Builder[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
def empty[A](implicit ct: ClassTag[A]): Set[A]

Returns an empty collection.

Returns an empty collection.

Attributes

Source
SeqConstructor.scala
def newBuilder[A](sizeHint: Int)(implicit ct: ClassTag[A]): Builder[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: Builder[A]): Set[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

Inherited methods

def addBoolean(builder: Builder[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

Inherited from:
SeqConstructor
Source
SeqConstructor.scala
def addByte(builder: Builder[Byte], a: Byte): Unit

Attributes

Inherited from:
SeqConstructor
Source
SeqConstructor.scala
def addChar(builder: Builder[Char], a: Char): Unit

Attributes

Inherited from:
SeqConstructor
Source
SeqConstructor.scala
def addDouble(builder: Builder[Double], a: Double): Unit

Attributes

Inherited from:
SeqConstructor
Source
SeqConstructor.scala
def addFloat(builder: Builder[Float], a: Float): Unit

Attributes

Inherited from:
SeqConstructor
Source
SeqConstructor.scala
def addInt(builder: Builder[Int], a: Int): Unit

Attributes

Inherited from:
SeqConstructor
Source
SeqConstructor.scala
def addLong(builder: Builder[Long], a: Long): Unit

Attributes

Inherited from:
SeqConstructor
Source
SeqConstructor.scala
def addShort(builder: Builder[Short], a: Short): Unit

Attributes

Inherited from:
SeqConstructor
Source
SeqConstructor.scala