EqIsGiven

eu.throup.couldbe.EqIsGiven
class EqIsGiven[A] extends Hash[IsGiven[A]] with PartialOrder[IsGiven[A]]

Attributes

Graph
Supertypes
trait PartialOrder[IsGiven[A]]
trait Hash[IsGiven[A]]
trait Eq[IsGiven[A]]
trait Serializable
class Object
trait Matchable
class Any

Members list

Concise view

Value members

Concrete methods

override def hash(x: IsGiven[A]): Int

Returns the hash code of the given object under this hashing scheme.

Returns the hash code of the given object under this hashing scheme.

Attributes

Definition Classes
Hash
override def partialCompare(x: IsGiven[A], y: IsGiven[A]): Double

Result of comparing x with y. Returns NaN if operands are not comparable. If operands are comparable, returns a Double whose sign is:

Result of comparing x with y. Returns NaN if operands are not comparable. If operands are comparable, returns a Double whose sign is:

  • negative iff x < y
  • zero iff x = y
  • positive iff x > y

Attributes

Definition Classes
PartialOrder

Inherited methods

def eqv(x: IsGiven[A], y: IsGiven[A]): Boolean

Returns true if x = y, false otherwise.

Returns true if x = y, false otherwise.

Attributes

Inherited from:
PartialOrder
def gt(x: IsGiven[A], y: IsGiven[A]): Boolean

Returns true if x > y, false otherwise.

Returns true if x > y, false otherwise.

Attributes

Inherited from:
PartialOrder
def gteqv(x: IsGiven[A], y: IsGiven[A]): Boolean

Returns true if x >= y, false otherwise.

Returns true if x >= y, false otherwise.

Attributes

Inherited from:
PartialOrder
def lt(x: IsGiven[A], y: IsGiven[A]): Boolean

Returns true if x < y, false otherwise.

Returns true if x < y, false otherwise.

Attributes

Inherited from:
PartialOrder
def lteqv(x: IsGiven[A], y: IsGiven[A]): Boolean

Returns true if x <= y, false otherwise.

Returns true if x <= y, false otherwise.

Attributes

Inherited from:
PartialOrder
def neqv(x: IsGiven[A], y: IsGiven[A]): Boolean

Returns false if x and y are equivalent, true otherwise.

Returns false if x and y are equivalent, true otherwise.

Attributes

Inherited from:
Eq
def partialComparison(x: IsGiven[A], y: IsGiven[A]): Option[Comparison]

Like partialCompare, but returns a cats.kernel.Comparison instead of an Double. Has the benefit of being able to pattern match on, but not as performant.

Like partialCompare, but returns a cats.kernel.Comparison instead of an Double. Has the benefit of being able to pattern match on, but not as performant.

Attributes

Inherited from:
PartialOrder
def pmax(x: IsGiven[A], y: IsGiven[A]): Option[A]

Returns Some(x) if x >= y, Some(y) if x < y, otherwise None.

Returns Some(x) if x >= y, Some(y) if x < y, otherwise None.

Attributes

Inherited from:
PartialOrder
def pmin(x: IsGiven[A], y: IsGiven[A]): Option[A]

Returns Some(x) if x <= y, Some(y) if x > y, otherwise None.

Returns Some(x) if x <= y, Some(y) if x > y, otherwise None.

Attributes

Inherited from:
PartialOrder
def tryCompare(x: IsGiven[A], y: IsGiven[A]): Option[Int]

Result of comparing x with y. Returns None if operands are not comparable. If operands are comparable, returns Some[Int] where the Int sign is:

Result of comparing x with y. Returns None if operands are not comparable. If operands are comparable, returns Some[Int] where the Int sign is:

  • negative iff x < y
  • zero iff x = y
  • positive iff x > y

Attributes

Inherited from:
PartialOrder