NonEmptySet

zio.prelude.NonEmptySet
See theNonEmptySet companion class
object NonEmptySet

Attributes

Companion
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def apply[A](elem: A, others: A*): NonEmptySet[A]

Creates a NonEmptySet with the specified elements.

Creates a NonEmptySet with the specified elements.

Type parameters

A

the type of the NonEmptySet's elements

Value parameters

elem

an element of the created NonEmptySet

others

the remaining elements of the created NonEmptySet

Attributes

Returns

a new NonEmptySet with elements elem and others

Constructs a NonEmptySet from an element and Iterable.

Constructs a NonEmptySet from an element and Iterable.

Attributes

Constructs a NonEmptySet from an Iterable or None otherwise.

Constructs a NonEmptySet from an Iterable or None otherwise.

Attributes

Constructs a NonEmptyChunk from a NonEmptyList.

Constructs a NonEmptyChunk from a NonEmptyList.

Attributes

Constructs a NonEmptySet from a NonEmptyList.

Constructs a NonEmptySet from a NonEmptyList.

Attributes

def fromSet[A](elem: A, others: Set[A]): NonEmptySet[A]

Constructs a NonEmptySet from an element and Set.

Constructs a NonEmptySet from an element and Set.

Attributes

Constructs a NonEmptySet from a Set or None otherwise.

Constructs a NonEmptySet from a Set or None otherwise.

Attributes

def single[A](head: A): NonEmptySet[A]

Constructs a NonEmptySet with the specified single value.

Constructs a NonEmptySet with the specified single value.

Attributes

def unapply[A](arg: NonEmptySet[A]): Some[(A, Set[A])]
def union[A](l: NonEmptySet[A], r: Set[A]): NonEmptySet[A]

Creates a NonEmptySet containing elements from l and r

Creates a NonEmptySet containing elements from l and r

Attributes

def union[A](l: Set[A], r: NonEmptySet[A]): NonEmptySet[A]

Creates a NonEmptySet containing elements from l and r

Creates a NonEmptySet containing elements from l and r

Attributes

Implicits

Implicits

The CommutativeEither instance for NonEmptySet.

The CommutativeEither instance for NonEmptySet.

Attributes

The Commutative and Idempotent (and thus Associative) instance for NonEmptySet.

The Commutative and Idempotent (and thus Associative) instance for NonEmptySet.

Attributes

implicit def NonEmptySetDebug[A : Debug]: Debug[NonEmptySet[A]]

Derives a Debug[NonEmptySet[A]] given a Debug[A].

Derives a Debug[NonEmptySet[A]] given a Debug[A].

Attributes

The DeriveEqual instance for NonEmptySet.

The DeriveEqual instance for NonEmptySet.

Attributes

Derives a Hash[NonEmptySet[A]] and PartialOrd[NonEmptySet[A]] (and thus Equal[NonEmptyList[A]]) instance.

Derives a Hash[NonEmptySet[A]] and PartialOrd[NonEmptySet[A]] (and thus Equal[NonEmptyList[A]]) instance.

Attributes

The Invariant instance for NonEmptySet.

The Invariant instance for NonEmptySet.

Attributes

implicit def toSet[A](nonEmptySet: NonEmptySet[A]): Set[A]

Provides an implicit conversion from NonEmptySet to the Set for interoperability with Scala's collection library.

Provides an implicit conversion from NonEmptySet to the Set for interoperability with Scala's collection library.

Attributes