@@ -10,7 +10,7 @@ package scala.math
1010
1111/** A trait for data that have a single, natural ordering. See
1212 * [[scala.math.Ordering ]] before using this trait for
13- * more information about whether to use use [[scala.math.Ordering ]] instead.
13+ * more information about whether to use [[scala.math.Ordering ]] instead.
1414 *
1515 * Classes that implement this trait can be sorted with
1616 * [[scala.utils.Sorting ]] and can be compared with standard comparison operators
@@ -20,8 +20,9 @@ package scala.math
2020 * integers) while Ordering allows for multiple ordering implementations.
2121 * An Ordering instance will be implicitly created if necessary.
2222 *
23- * [[scala.math.Ordering ]] is an alternative to this trait that allows multiple orderings to be defined for the same type.
24- *
23+ * [[scala.math.Ordering ]] is an alternative to this trait that allows multiple orderings to be
24+ * defined for the same type.
25+ *
2526 * [[scala.math.PartiallyOrdered ]] is an alternative to this trait for partially ordered data.
2627 *
2728 * For example, to create a simple class that implements Ordered and then sort it with [[scala.utils.Sorting ]]:
@@ -34,23 +35,16 @@ package scala.math
3435 * val result = scala.utils.Sorting.quickSort(x)
3536 * }}}
3637 *
37- * Some additional notes from the initial implementation:
38- *
39- * Note that since version 2006-07-24 this trait is no longer covariant in `A`.
40- *
41- * It is important that the `equals` method for an instance of `Ordered[A]`
42- * be consistent with the compare method. However, due to limitations
43- * inherent in the type erasure semantics, there is no reasonable way to
44- * provide a default implementation of equality for instances of `Ordered[A]`.
45- * Therefore, if you need to be able to use equality on an instance of
46- * `Ordered[A]` you must provide it yourself either when inheriting or
47- * instantiating.
38+ * It is important that the `equals` method for an instance of `Ordered[A]` be consistent with the
39+ * compare method. However, due to limitations inherent in the type erasure semantics, there is no
40+ * reasonable way to provide a default implementation of equality for instances of `Ordered[A]`.
41+ * Therefore, if you need to be able to use equality on an instance of `Ordered[A]` you must
42+ * provide it yourself either when inheriting or instantiating.
4843 *
49- * It is important that the `hashCode` method for an instance of `Ordered[A]`
50- * be consistent with the `compare` method. However, it is not possible to
51- * provide a sensible default implementation. Therefore, if you need to be
52- * able compute the hash of an instance of `Ordered[A]` you must provide it
53- * yourself either when inheriting or instantiating.
44+ * It is important that the `hashCode` method for an instance of `Ordered[A]` be consistent with
45+ * the `compare` method. However, it is not possible to provide a sensible default implementation.
46+ * Therefore, if you need to be able compute the hash of an instance of `Ordered[A]` you must
47+ * provide it yourself either when inheriting or instantiating.
5448 *
5549 * @see [[scala.math.Ordering ]], [[scala.math.PartiallyOrdered ]]
5650 * @author Martin Odersky
0 commit comments