ConcurrentSet

zio.concurrent.ConcurrentSet
See theConcurrentSet companion object
final class ConcurrentSet[A] extends AnyVal

A ConcurrentSet is a Set wrapper over java.util.concurrent.ConcurrentHashMap.

Attributes

Companion
object
Graph
Supertypes
class AnyVal
trait Matchable
class Any

Members list

Value members

Concrete methods

def add(x: A): UIO[Boolean]

Adds a new value.

Adds a new value.

Attributes

def addAll(xs: Iterable[A]): UIO[Boolean]

Adds all new values.

Adds all new values.

Attributes

def clear: UIO[Unit]

Removes all elements.

Removes all elements.

Attributes

def collectFirst[B](pf: PartialFunction[A, B]): UIO[Option[B]]

Finds the first element of a set for which the partial function is defined and applies the function to it.

Finds the first element of a set for which the partial function is defined and applies the function to it.

Attributes

def contains(x: A): UIO[Boolean]

Tests whether if the element is in the set.

Tests whether if the element is in the set.

Attributes

def containsAll(xs: Iterable[A]): UIO[Boolean]

Tests if the elements in the collection are a subset of the set.

Tests if the elements in the collection are a subset of the set.

Attributes

def exists(p: A => Boolean): UIO[Boolean]

Tests whether a given predicate holds true for at least one element in the set.

Tests whether a given predicate holds true for at least one element in the set.

Attributes

def find[B](p: A => Boolean): UIO[Option[A]]

Retrieves the elements in which predicate is satisfied.

Retrieves the elements in which predicate is satisfied.

Attributes

def fold[R, E, S](zero: S)(f: (S, A) => S): UIO[S]

Folds the elements of a set using the given binary operator.

Folds the elements of a set using the given binary operator.

Attributes

def forall(p: A => Boolean): UIO[Boolean]

Tests whether a predicate is satisfied by all elements of a set.

Tests whether a predicate is satisfied by all elements of a set.

Attributes

def isEmpty: UIO[Boolean]

True if there are no elements in the set.

True if there are no elements in the set.

Attributes

def remove(x: A): UIO[Boolean]

Removes the entry for the given value if it is mapped to an existing element.

Removes the entry for the given value if it is mapped to an existing element.

Attributes

def removeAll(xs: Iterable[A]): UIO[Boolean]

Removes all the entries for the given values if they are mapped to an existing element.

Removes all the entries for the given values if they are mapped to an existing element.

Attributes

def removeIf(p: A => Boolean): UIO[Boolean]

Removes all elements which satisfy the given predicate.

Removes all elements which satisfy the given predicate.

Attributes

def retainAll(xs: Iterable[A]): UIO[Boolean]

Retain all the entries for the given values if they are mapped to an existing element.

Retain all the entries for the given values if they are mapped to an existing element.

Attributes

def retainIf(p: A => Boolean): UIO[Boolean]

Removes all elements which do not satisfy the given predicate.

Removes all elements which do not satisfy the given predicate.

Attributes

def size: UIO[Int]

Number of elements in the set.

Number of elements in the set.

Attributes

def toSet: UIO[Set[A]]

Convert the ConcurrentSet to Set.

Convert the ConcurrentSet to Set.

Attributes

def transform(f: A => A): UIO[Unit]

Transform all elements of the ConcurrentSet using the given function.

Transform all elements of the ConcurrentSet using the given function.

Attributes