SetSemilattice

class SetSemilattice[A] extends BoundedSemilattice[Set[A]]
trait BoundedSemilattice[Set[A]]
trait CommutativeMonoid[Set[A]]
trait Monoid[Set[A]]
trait Semilattice[Set[A]]
trait CommutativeSemigroup[Set[A]]
trait Band[Set[A]]
trait Semigroup[Set[A]]
trait Serializable
class Object
trait Matchable
class Any

Value members

Concrete methods

def combine(x: Set[A], y: Set[A]): Set[A]
def empty: Set[A]

Inherited methods

def asJoinPartialOrder(ev: Eq[Set[A]]): PartialOrder[Set[A]]

Given Eq[A], return a PartialOrder[A] using the combine operator to determine the partial ordering. This method assumes combine functions as join (that is, as an upper bound).

Given Eq[A], return a PartialOrder[A] using the combine operator to determine the partial ordering. This method assumes combine functions as join (that is, as an upper bound).

This method returns:

0.0 if x = y -1.0 if y = combine(x, y) 1.0 if x = combine(x, y) NaN otherwise

Inherited from
Semilattice
def asMeetPartialOrder(ev: Eq[Set[A]]): PartialOrder[Set[A]]

Given Eq[A], return a PartialOrder[A] using the combine operator to determine the partial ordering. This method assumes combine functions as meet (that is, as a lower bound).

Given Eq[A], return a PartialOrder[A] using the combine operator to determine the partial ordering. This method assumes combine functions as meet (that is, as a lower bound).

This method returns:

0.0 if x = y -1.0 if x = combine(x, y) 1.0 if y = combine(x, y) NaN otherwise

Inherited from
Semilattice
def combineAll(as: IterableOnce[Set[A]]): Set[A]

Given a sequence of as, sum them using the monoid and return the total.

Given a sequence of as, sum them using the monoid and return the total.

Example:

scala> import cats.kernel.instances.string._

scala> Monoid[String].combineAll(List("One ", "Two ", "Three"))
res0: String = One Two Three

scala> Monoid[String].combineAll(List.empty)
res1: String = ""
Inherited from
Monoid
override def combineAllOption(as: IterableOnce[Set[A]]): Option[Set[A]]
Definition Classes
Inherited from
Monoid
override def combineN(a: Set[A], n: Int): Set[A]
Definition Classes
Inherited from
BoundedSemilattice
override def intercalate(middle: Set[A]): CommutativeSemigroup[Set[A]]
Definition Classes
Inherited from
CommutativeSemigroup
def isEmpty(a: Set[A])(ev: Eq[Set[A]]): Boolean

Tests if a is the identity.

Tests if a is the identity.

Example:

scala> import cats.kernel.instances.string._

scala> Monoid[String].isEmpty("")
res0: Boolean = true

scala> Monoid[String].isEmpty("something")
res1: Boolean = false
Inherited from
Monoid
override def reverse: CommutativeMonoid[Set[A]]