LowPriorityOrderingImplicits

scala.math.LowPriorityOrderingImplicits

Attributes

Source
Ordering.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Ordering

Members list

Type members

Types

type AsComparable[A] = A => Comparable[_ >: A]

Attributes

Source
Ordering.scala

Implicits

Implicits

implicit def comparatorToOrdering[A](implicit cmp: Comparator[A]): Ordering[A]

Attributes

Source
Ordering.scala
implicit def ordered[A](implicit asComparable: () => A): Ordering[A]

This would conflict with all the nice implicit Orderings available, but thanks to the magic of prioritized implicits via subclassing we can make Ordered[A] => Ordering[A] only turn up if nothing else works.

This would conflict with all the nice implicit Orderings available, but thanks to the magic of prioritized implicits via subclassing we can make Ordered[A] => Ordering[A] only turn up if nothing else works. Since Ordered[A] extends Comparable[A] anyway, we can throw in some Java interop too.

Attributes

Source
Ordering.scala