diff options
author | Dominik Gruntz <dominik.gruntz@fhnw.ch> | 2012-06-05 17:42:56 +0200 |
---|---|---|
committer | Dominik Gruntz <dominik.gruntz@fhnw.ch> | 2012-06-05 17:42:56 +0200 |
commit | 5d3f8b9e225a570fd17a36d2a6b4036a0819f646 (patch) | |
tree | a0ad753d59dc30304f3f0a4ba7b4610c794a0ac2 | |
parent | e90ea27cbeff305860a583160373a2af5b59581d (diff) | |
download | scala-5d3f8b9e225a570fd17a36d2a6b4036a0819f646.tar.gz scala-5d3f8b9e225a570fd17a36d2a6b4036a0819f646.tar.bz2 scala-5d3f8b9e225a570fd17a36d2a6b4036a0819f646.zip |
fixes typos in scaladoc of Orderes.cala
-rw-r--r-- | src/library/scala/math/Ordered.scala | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/library/scala/math/Ordered.scala b/src/library/scala/math/Ordered.scala index 80addea7f3..a5efa41b80 100644 --- a/src/library/scala/math/Ordered.scala +++ b/src/library/scala/math/Ordered.scala @@ -15,7 +15,7 @@ import language.implicitConversions * more information about whether to use [[scala.math.Ordering]] instead. * * Classes that implement this trait can be sorted with - * [[scala.utils.Sorting]] and can be compared with standard comparison operators + * [[scala.util.Sorting]] and can be compared with standard comparison operators * (e.g. > and <). * * Ordered should be used for data with a single, natural ordering (like @@ -27,14 +27,15 @@ import language.implicitConversions * * [[scala.math.PartiallyOrdered]] is an alternative to this trait for partially ordered data. * - * For example, to create a simple class that implements Ordered and then sort it with [[scala.utils.Sorting]]: + * For example, create a simple class that implements `Ordered` and then sort it with [[scala.util.Sorting]]: * {{{ - * class OrderedClass(n:Int) extends Ordered[OrderedClass] { + * case class OrderedClass(n:Int) extends Ordered[OrderedClass] { * def compare(that: OrderedClass) = this.n - that.n * } * - * val x = List(new MyClass(1), new MyClass(5), new MyClass(3)) - * val result = scala.utils.Sorting.quickSort(x) + * val x = Array(OrderedClass(1), OrderedClass(5), OrderedClass(3)) + * scala.util.Sorting.quickSort(x) + * x * }}} * * It is important that the `equals` method for an instance of `Ordered[A]` be consistent with the |