object Order extends OrderFunctions[Order] with OrderToOrderingConversion with Serializable
- Source
- Order.scala
- Alphabetic
- By Inheritance
- Order
- Serializable
- Serializable
- OrderToOrderingConversion
- OrderFunctions
- PartialOrderFunctions
- EqFunctions
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
allEqual[A]: Order[A]
An
Order
instance that considers allA
instances to be equal. -
final
def
apply[A](implicit ev: Order[A]): Order[A]
Access an implicit
Order[A]
.Access an implicit
Order[A]
.- Annotations
- @inline()
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
by[A, B](f: (A) ⇒ B)(implicit ev: Order[B]): Order[A]
Convert an implicit
Order[B]
to anOrder[A]
using the given functionf
. -
implicit
def
catsKernelOrderingForOrder[A](implicit ev: Order[A]): Ordering[A]
Implicitly derive a
scala.math.Ordering[A]
from aOrder[A]
instance.Implicitly derive a
scala.math.Ordering[A]
from aOrder[A]
instance.- Definition Classes
- OrderToOrderingConversion
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @IntrinsicCandidate()
-
def
compare[A](x: A, y: A)(implicit ev: Order[A]): Int
- Definition Classes
- OrderFunctions
-
def
comparison[A](x: A, y: A)(implicit ev: Order[A]): Comparison
- Definition Classes
- OrderFunctions
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
eqv[A](x: A, y: A)(implicit ev: Order[A]): Boolean
- Definition Classes
- EqFunctions
-
def
from[A](f: (A, A) ⇒ Int): Order[A]
Define an
Order[A]
using the given functionf
. - def fromComparable[A <: Comparable[A]]: Order[A]
-
def
fromLessThan[A](f: (A, A) ⇒ Boolean): Order[A]
Define an
Order[A]
using the given 'less than' functionf
. - def fromOrdering[A](implicit ev: Ordering[A]): Order[A]
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
-
def
gt[A](x: A, y: A)(implicit ev: Order[A]): Boolean
- Definition Classes
- PartialOrderFunctions
-
def
gteqv[A](x: A, y: A)(implicit ev: Order[A]): Boolean
- Definition Classes
- PartialOrderFunctions
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
lt[A](x: A, y: A)(implicit ev: Order[A]): Boolean
- Definition Classes
- PartialOrderFunctions
-
def
lteqv[A](x: A, y: A)(implicit ev: Order[A]): Boolean
- Definition Classes
- PartialOrderFunctions
-
def
max[A](x: A, y: A)(implicit ev: Order[A]): A
- Definition Classes
- OrderFunctions
-
def
min[A](x: A, y: A)(implicit ev: Order[A]): A
- Definition Classes
- OrderFunctions
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
neqv[A](x: A, y: A)(implicit ev: Order[A]): Boolean
- Definition Classes
- EqFunctions
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
-
def
partialCompare[A](x: A, y: A)(implicit ev: Order[A]): Double
- Definition Classes
- PartialOrderFunctions
-
def
pmax[A](x: A, y: A)(implicit ev: Order[A]): Option[A]
- Definition Classes
- PartialOrderFunctions
-
def
pmin[A](x: A, y: A)(implicit ev: Order[A]): Option[A]
- Definition Classes
- PartialOrderFunctions
-
def
reverse[A](order: Order[A]): Order[A]
Defines an ordering on
A
from the given order such that all arrows switch direction. -
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
tryCompare[A](x: A, y: A)(implicit ev: Order[A]): Option[Int]
- Definition Classes
- PartialOrderFunctions
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
whenEqual[A](first: Order[A], second: Order[A]): Order[A]
Returns a new
Order[A]
instance that first compares by the firstOrder
instance and uses the secondOrder
instance to "break ties".Returns a new
Order[A]
instance that first compares by the firstOrder
instance and uses the secondOrder
instance to "break ties".That is,
Order.whenEqual(x, y)
creates anOrder
that first orders byx
and then (if two elements are equal) falls back toy
for the comparison. -
def
whenEqualMonoid[A]: Monoid[Order[A]] with Band[Order[A]]
A
Monoid[Order[A]]
can be generated for allA
with the following properties:A
Monoid[Order[A]]
can be generated for allA
with the following properties:empty
returns a trivialOrder[A]
which considers allA
instances to be equal.combine(x: Order[A], y: Order[A])
creates anOrder[A]
that first orders byx
and then (if two elements are equal) falls back toy
.This monoid is also a
Band[Order[A]]
since its combine operations is idempotent.- See also