TSet

zio.stm.TSet
See theTSet companion object
final class TSet[A] extends AnyVal

Transactional set implemented on top of TMap.

Attributes

Companion
object
Source
TSet.scala
Graph
Supertypes
class AnyVal
trait Matchable
class Any

Members list

Value members

Concrete methods

def contains(a: A): USTM[Boolean]

Tests whether or not set contains an element.

Tests whether or not set contains an element.

Attributes

Source
TSet.scala
def delete(a: A): USTM[Unit]

Removes a single element from the set.

Removes a single element from the set.

Attributes

Source
TSet.scala
def deleteAll(as: Iterable[A]): USTM[Unit]

Removes elements from the set.

Removes elements from the set.

Attributes

Source
TSet.scala
def diff(other: TSet[A]): USTM[Unit]

Atomically transforms the set into the difference of itself and the provided set.

Atomically transforms the set into the difference of itself and the provided set.

Attributes

Source
TSet.scala
def fold[B](zero: B)(op: (B, A) => B): USTM[B]

Atomically folds using a pure function.

Atomically folds using a pure function.

Attributes

Source
TSet.scala
def foldSTM[B, E](zero: B)(op: (B, A) => STM[E, B]): STM[E, B]

Atomically folds using a transactional function.

Atomically folds using a transactional function.

Attributes

Source
TSet.scala
def foreach[E](f: A => STM[E, Unit]): STM[E, Unit]

Atomically performs transactional-effect for each element in set.

Atomically performs transactional-effect for each element in set.

Attributes

Source
TSet.scala
def intersect(other: TSet[A]): USTM[Unit]

Atomically transforms the set into the intersection of itself and the provided set.

Atomically transforms the set into the intersection of itself and the provided set.

Attributes

Source
TSet.scala

Tests if the set is empty or not

Tests if the set is empty or not

Attributes

Source
TSet.scala
def put(a: A): USTM[Unit]

Stores new element in the set.

Stores new element in the set.

Attributes

Source
TSet.scala
def removeIf(p: A => Boolean): USTM[Chunk[A]]

Removes bindings matching predicate and returns the removed entries.

Removes bindings matching predicate and returns the removed entries.

Attributes

Source
TSet.scala
def removeIfDiscard(p: A => Boolean): USTM[Unit]

Removes elements matching predicate.

Removes elements matching predicate.

Attributes

Source
TSet.scala
def retainIf(p: A => Boolean): USTM[Chunk[A]]

Retains bindings matching predicate and returns removed bindings.

Retains bindings matching predicate and returns removed bindings.

Attributes

Source
TSet.scala
def retainIfDiscard(p: A => Boolean): USTM[Unit]

Retains elements matching predicate.

Retains elements matching predicate.

Attributes

Source
TSet.scala
def size: USTM[Int]

Returns the set's cardinality.

Returns the set's cardinality.

Attributes

Source
TSet.scala
def takeFirst[B](pf: PartialFunction[A, B]): USTM[B]

Takes the first matching value, or retries until there is one.

Takes the first matching value, or retries until there is one.

Attributes

Source
TSet.scala
def takeFirstSTM[R, E, B](pf: A => ZSTM[R, Option[E], B]): ZSTM[R, E, B]

Attributes

Source
TSet.scala
def takeSome[B](pf: PartialFunction[A, B]): USTM[NonEmptyChunk[B]]

Takes all matching values, or retries until there is at least one.

Takes all matching values, or retries until there is at least one.

Attributes

Source
TSet.scala
def takeSomeSTM[R, E, B](pf: A => ZSTM[R, Option[E], B]): ZSTM[R, E, NonEmptyChunk[B]]

Takes all matching values, or retries until there is at least one.

Takes all matching values, or retries until there is at least one.

Attributes

Source
TSet.scala
def toList: USTM[List[A]]

Collects all elements into a list.

Collects all elements into a list.

Attributes

Source
TSet.scala
def toSet: USTM[Set[A]]

Collects all elements into a set.

Collects all elements into a set.

Attributes

Source
TSet.scala
def transform(f: A => A): USTM[Unit]

Atomically updates all elements using a pure function.

Atomically updates all elements using a pure function.

Attributes

Source
TSet.scala
def transformSTM[E](f: A => STM[E, A]): STM[E, Unit]

Atomically updates all elements using a transactional function.

Atomically updates all elements using a transactional function.

Attributes

Source
TSet.scala
def union(other: TSet[A]): USTM[Unit]

Atomically transforms the set into the union of itself and the provided set.

Atomically transforms the set into the union of itself and the provided set.

Attributes

Source
TSet.scala