HashOrd

zio.prelude.coherent.HashOrd
See theHashOrd companion object
trait HashOrd[-A] extends HashPartialOrd[A], Ord[A]

Attributes

Companion
object
Graph
Supertypes
trait Ord[A]
trait HashPartialOrd[A]
trait PartialOrd[A]
trait Hash[A]
trait Equal[A]
class Object
trait Matchable
class Any
Show all
Self type
HashOrd[A]

Members list

Value members

Concrete methods

final override def contramap[B](f: B => A): Hash[B] & Ord[B]

Constructs an Ord[B] given an Ord[A] and a function f to transform a B value into an A value. The instance will convert each B value into an A and compare the A values.

Constructs an Ord[B] given an Ord[A] and a function f to transform a B value into an A value. The instance will convert each B value into an A and compare the A values.

Attributes

Definition Classes

Inherited methods

final def both[B](that: => Ord[B]): Ord[(A, B)]

Constructs an Ord[(A, B)] given an Ord[A] and Ord[B] by first comparing the A values, and then if the A values are equal comparing the B values

Constructs an Ord[(A, B)] given an Ord[A] and Ord[B] by first comparing the A values, and then if the A values are equal comparing the B values

Attributes

Inherited from:
Ord
final def both[B](that: => PartialOrd[B]): PartialOrd[(A, B)]

Constructs an PartialOrd[(A, B)] given an PartialOrd[A] and PartialOrd[B] by first comparing the A values, and then if the A values are equal comparing the B values

Constructs an PartialOrd[(A, B)] given an PartialOrd[A] and PartialOrd[B] by first comparing the A values, and then if the A values are equal comparing the B values

Attributes

Inherited from:
PartialOrd
final def both[B](that: => Equal[B]): Equal[(A, B)]

Constructs an Equal[(A, B)] given an Equal[A] and Equal[B] by first comparing the A values for equality and then comparing the B values for equality, if necessary.

Constructs an Equal[(A, B)] given an Equal[A] and Equal[B] by first comparing the A values for equality and then comparing the B values for equality, if necessary.

Attributes

Inherited from:
Equal
final def bothWith[B, C](that: => Ord[B])(f: C => (A, B)): Ord[C]

Constructs an Ord[C] given an Ord[A], an Ord[B] and a function f to transform a C value into an (A, B). The instance will convert each C value into an (A, B), compare the A values, and then if the A values are equal compare the B values.

Constructs an Ord[C] given an Ord[A], an Ord[B] and a function f to transform a C value into an (A, B). The instance will convert each C value into an (A, B), compare the A values, and then if the A values are equal compare the B values.

Attributes

Inherited from:
Ord
final def bothWith[B, C](that: => PartialOrd[B])(f: C => (A, B)): PartialOrd[C]

Constructs an PartialOrd[C] given an PartialOrd[A], an PartialOrd[B] and a function f to transform a C value into an (A, B). The instance will convert each C value into an (A, B), compare the A values, and then if the A values are equal compare the B values.

Constructs an PartialOrd[C] given an PartialOrd[A], an PartialOrd[B] and a function f to transform a C value into an (A, B). The instance will convert each C value into an (A, B), compare the A values, and then if the A values are equal compare the B values.

Attributes

Inherited from:
PartialOrd
final def bothWith[B, C](that: => Equal[B])(f: C => (A, B)): Equal[C]

Constructs an Equal[C] given an Equal[A], an Equal[B] and a function f to transform a C value into an (A, B). The instance will convert each C value into an (A, B), compare the A values for equality, and then compare the B values for equality if necessary.

Constructs an Equal[C] given an Equal[A], an Equal[B] and a function f to transform a C value into an (A, B). The instance will convert each C value into an (A, B), compare the A values for equality, and then compare the B values for equality if necessary.

Attributes

Inherited from:
Equal
final override def compare(l: A, r: A): Ordering

Returns the result of comparing two values of type A.

Returns the result of comparing two values of type A.

Attributes

Definition Classes
Inherited from:
Ord
final def either[B](that: => Ord[B]): Ord[Either[A, B]]

Constructs an Ord[Either[A, B]] given an Ord[A] and an Ord[B]. If one value is Left and one value is Right it will treat the Left value as less than the Right value. Otherwise, it will compare the two values.

Constructs an Ord[Either[A, B]] given an Ord[A] and an Ord[B]. If one value is Left and one value is Right it will treat the Left value as less than the Right value. Otherwise, it will compare the two values.

Attributes

Inherited from:
Ord
final def either[B](that: => PartialOrd[B]): PartialOrd[Either[A, B]]

Constructs an PartialOrd[Either[A, B]] given an PartialOrd[A] and an PartialOrd[B]. If one value is Left and one value is Right it will treat the Left value as less than the Right value. Otherwise, it will compare the two values.

Constructs an PartialOrd[Either[A, B]] given an PartialOrd[A] and an PartialOrd[B]. If one value is Left and one value is Right it will treat the Left value as less than the Right value. Otherwise, it will compare the two values.

Attributes

Inherited from:
PartialOrd
final def either[B](that: => Equal[B]): Equal[Either[A, B]]

Constructs an Equal[Either[A, B]] given an Equal[A] and an Equal[B]. The instance will compare the Either[A, B] values and if both are Right or Left compare them for equality.

Constructs an Equal[Either[A, B]] given an Equal[A] and an Equal[B]. The instance will compare the Either[A, B] values and if both are Right or Left compare them for equality.

Attributes

Inherited from:
Equal
final def eitherWith[B, C](that: => Ord[B])(f: C => Either[A, B]): Ord[C]

Constructs an Ord[C] given an Ord[A], an Ord[B], and a function f to transform a C value into an Either[A, B]. The instance will convert each C value into an Either[A, B]. If one value is Left and one value is Right it will treat the Left value as less than the Right value. Otherwise, it will compare the two values.

Constructs an Ord[C] given an Ord[A], an Ord[B], and a function f to transform a C value into an Either[A, B]. The instance will convert each C value into an Either[A, B]. If one value is Left and one value is Right it will treat the Left value as less than the Right value. Otherwise, it will compare the two values.

Attributes

Inherited from:
Ord
final def eitherWith[B, C](that: => PartialOrd[B])(f: C => Either[A, B]): PartialOrd[C]

Constructs an PartialOrd[C] given an PartialOrd[A], an PartialOrd[B], and a function f to transform a C value into an Either[A, B]. The instance will convert each C value into an Either[A, B]. If one value is Left and one value is Right it will treat the Left value as less than the Right value. Otherwise, it will compare the two values.

Constructs an PartialOrd[C] given an PartialOrd[A], an PartialOrd[B], and a function f to transform a C value into an Either[A, B]. The instance will convert each C value into an Either[A, B]. If one value is Left and one value is Right it will treat the Left value as less than the Right value. Otherwise, it will compare the two values.

Attributes

Inherited from:
PartialOrd
final def eitherWith[B, C](that: => Equal[B])(f: C => Either[A, B]): Equal[C]

Constructs an Equal[C] given an Equal[A], an Equal[B], and a function f to transform a C value into an Either[A, B]. The instance will convert each C value into an Either[A, B] and then if both are Right or Left compare them for equality.

Constructs an Equal[C] given an Equal[A], an Equal[B], and a function f to transform a C value into an Either[A, B]. The instance will convert each C value into an Either[A, B] and then if both are Right or Left compare them for equality.

Attributes

Inherited from:
Equal
final def equal(l: A, r: A): Boolean

Returns whether two values of type A are equal.

Returns whether two values of type A are equal.

Attributes

Inherited from:
Equal
def greater(l: A, r: A): Boolean

Returns whether the left value is greater than the right value.

Returns whether the left value is greater than the right value.

Attributes

Inherited from:
PartialOrd
def greaterOrEqual(l: A, r: A): Boolean

Returns whether the left value is greater than or equal to the right value.

Returns whether the left value is greater than or equal to the right value.

Attributes

Inherited from:
PartialOrd
def hash(a: A): Int

Returns the hash of the specified value.

Returns the hash of the specified value.

Attributes

Inherited from:
Hash
def less(l: A, r: A): Boolean

Returns whether the left value is less than the right value.

Returns whether the left value is less than the right value.

Attributes

Inherited from:
PartialOrd
def lessOrEqual(l: A, r: A): Boolean

Returns whether the left value is less than or equal to the right value.

Returns whether the left value is less than or equal to the right value.

Attributes

Inherited from:
PartialOrd
final def mapOrdering(f: Ordering => Ordering): Ord[A]

Constructs a new Ord[A] by mapping the result of this ordering using the specified function.

Constructs a new Ord[A] by mapping the result of this ordering using the specified function.

Attributes

Inherited from:
Ord

Constructs a new PartialOrd[A] by mapping the result of this ordering using the specified function.

Constructs a new PartialOrd[A] by mapping the result of this ordering using the specified function.

Attributes

Inherited from:
PartialOrd
final def max[A1 <: A](l: A1, r: A1): A1

Returns the maximum of the left value and the right value.

Returns the maximum of the left value and the right value.

Attributes

Inherited from:
Ord
final def min[A1 <: A](l: A1, r: A1): A1

Returns the minimum of the left value and the right value.

Returns the minimum of the left value and the right value.

Attributes

Inherited from:
Ord
final def notEqual(l: A, r: A): Boolean

Returns whether two values of type A are not equal.

Returns whether two values of type A are not equal.

Attributes

Inherited from:
Equal
final def reverse: Ord[A]

Returns a new ordering that is the reverse of this one.

Returns a new ordering that is the reverse of this one.

Attributes

Inherited from:
Ord
override def toScala[A1 <: A]: Ordering[A1]

Attributes

Definition Classes
Ord -> Equal
Inherited from:
Ord