← ZIO Prelude docs

NonEmptySet

zio.prelude.NonEmptySet
See theNonEmptySet companion class
object NonEmptySet

Attributes

Companion
class
Source
NonEmptySet.scala
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

Source
NonEmptySet.scala
def fromIterable[A](head: A, tail: Iterable[A]): NonEmptySet[A]

Constructs a NonEmptySet from an element and Iterable.

Constructs a NonEmptySet from an element and Iterable.

Attributes

Source
NonEmptySet.scala
def fromIterableOption[A](iterable: Iterable[A]): Option[NonEmptySet[A]]

Constructs a NonEmptySet from an Iterable or None otherwise.

Constructs a NonEmptySet from an Iterable or None otherwise.

Attributes

Source
NonEmptySet.scala

Constructs a NonEmptyChunk from a NonEmptyList.

Constructs a NonEmptyChunk from a NonEmptyList.

Attributes

Source
NonEmptySet.scala
def fromNonEmptyList[A](elems: NonEmptyList[A]): NonEmptySet[A]

Constructs a NonEmptySet from a NonEmptyList.

Constructs a NonEmptySet from a NonEmptyList.

Attributes

Source
NonEmptySet.scala
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

Source
NonEmptySet.scala
def fromSetOption[A](set: Set[A]): Option[NonEmptySet[A]]

Constructs a NonEmptySet from a Set or None otherwise.

Constructs a NonEmptySet from a Set or None otherwise.

Attributes

Source
NonEmptySet.scala
def single[A](head: A): NonEmptySet[A]

Constructs a NonEmptySet with the specified single value.

Constructs a NonEmptySet with the specified single value.

Attributes

Source
NonEmptySet.scala
def unapply[A](arg: NonEmptySet[A]): Some[(A, Set[A])]

Attributes

Source
NonEmptySet.scala
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

Source
NonEmptySet.scala
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

Source
NonEmptySet.scala

Implicits

Implicits

The CommutativeEither instance for NonEmptySet.

The CommutativeEither instance for NonEmptySet.

Attributes

Source
NonEmptySet.scala

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

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

Attributes

Source
NonEmptySet.scala
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

Source
NonEmptySet.scala

The DeriveEqual instance for NonEmptySet.

The DeriveEqual instance for NonEmptySet.

Attributes

Source
NonEmptySet.scala

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

Source
NonEmptySet.scala

The Invariant instance for NonEmptySet.

The Invariant instance for NonEmptySet.

Attributes

Source
NonEmptySet.scala
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

Source
NonEmptySet.scala