ConcurrentSet

final class ConcurrentSet[A] extends AnyVal

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

Companion:
object
class AnyVal
trait Matchable
class Any

Value members

Concrete methods

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

Adds a new value.

Adds a new value.

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

Adds all new values.

Adds all new values.

def clear: UIO[Unit]

Removes all elements.

Removes all elements.

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.

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

Tests whether if the element is in the set.

Tests whether if the element is in the set.

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.

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.

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.

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.

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.

True if there are no elements in the set.

True if there are no elements in the set.

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.

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.

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

Removes all elements which satisfy the given predicate.

Removes all elements which satisfy the given predicate.

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.

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.

def size: UIO[Int]

Number of elements in the set.

Number of elements in the set.

def toSet: UIO[Set[A]]

Create a concurrent set from a set.

Create a concurrent set from a set.

@silent("JavaConverters")
def transform(f: A => A): UIO[Unit]

Create a concurrent set from a collection.

Create a concurrent set from a collection.