Ordering

zio.prelude.Ordering
See theOrdering companion object
sealed trait Ordering extends PartialOrdering

An Ordering is the result of comparing two values. The result may be LessThan, Equals, or GreaterThan.

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Known subtypes
object Equals
object GreaterThan
object LessThan
Self type

Members list

Value members

Concrete methods

final def <>(that: => Ordering): Ordering

A symbolic alias for orElse.

A symbolic alias for orElse.

Attributes

final def opposite: Ordering

Returns the opposite of this Ordering, with LessThan converted to GreaterThan and GreaterThan converted to LessThan.

Returns the opposite of this Ordering, with LessThan converted to GreaterThan and GreaterThan converted to LessThan.

Attributes

final def orElse(that: => Ordering): Ordering

Returns this ordering, but if this ordering is equal returns the specified ordering.

Returns this ordering, but if this ordering is equal returns the specified ordering.

Attributes

final def ordinal: Int

Converts this Ordering to an ordinal representation, with 0 representing LessThan, 1 representing Equals and 2 representing GreaterThan.

Converts this Ordering to an ordinal representation, with 0 representing LessThan, 1 representing Equals and 2 representing GreaterThan.

Attributes

Inherited methods

A symbolic alias for orElse.

A symbolic alias for orElse.

Attributes

Inherited from:
PartialOrdering
def canEqual(that: Any): Boolean

Attributes

Inherited from:
Equals
final def isEqual: Boolean

Returns whether this Ordering is Ordering.Equals.

Returns whether this Ordering is Ordering.Equals.

Attributes

Inherited from:
PartialOrdering
final def isGreaterThan: Boolean

Returns whether this Ordering is Ordering.GreaterThan.

Returns whether this Ordering is Ordering.GreaterThan.

Attributes

Inherited from:
PartialOrdering
final def isLessThan: Boolean

Returns whether this Ordering is Ordering.LessThan.

Returns whether this Ordering is Ordering.LessThan.

Attributes

Inherited from:
PartialOrdering

Returns this ordering, but if this ordering is equal returns the specified ordering.

Returns this ordering, but if this ordering is equal returns the specified ordering.

Attributes

Inherited from:
PartialOrdering

Attributes

Inherited from:
Product
def productElement(n: Int): Any

Attributes

Inherited from:
Product

Attributes

Inherited from:
Product

Attributes

Inherited from:
Product

Attributes

Inherited from:
Product

Attributes

Inherited from:
Product

Attributes

Inherited from:
PartialOrdering