As Ordered now extends Comparable, so too should

Ordering extend Comparator.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@18088 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
This commit is contained in:
extempore 2009-06-23 14:51:55 +00:00
parent c3a7ee6f60
commit bc6c0bd3b4
1 changed files with 3 additions and 1 deletions

View File

@ -10,6 +10,8 @@
package scala
import java.util.Comparator
/** A trait for representing total orderings. It is important to
* distinguish between a type that has a total order and a representation
* of total ordering on some type. This trait is for representing the
@ -38,7 +40,7 @@ package scala
* @version 0.9.5, 2008-04-15
*/
trait Ordering[T] extends PartialOrdering[T] {
trait Ordering[T] extends Comparator[T] with PartialOrdering[T] {
outer =>
/** Returns a negative integer iff <code>x</code> comes before
* <code>y</code> in the ordering, returns 0 iff <code>x</code>