summaryrefslogtreecommitdiff
path: root/src/library-aux
diff options
context:
space:
mode:
authorHeather Miller <heather.miller@epfl.ch>2011-10-18 18:54:41 +0000
committerHeather Miller <heather.miller@epfl.ch>2011-10-18 18:54:41 +0000
commitfb2353db6cc296289092ffa948e2e1c5f06c0d59 (patch)
tree0d511e7b04ed671631e788ff749b3a58d79b0536 /src/library-aux
parent75890493a0d95a5be9894c0baf085e4e6036a74e (diff)
downloadscala-fb2353db6cc296289092ffa948e2e1c5f06c0d59.tar.gz
scala-fb2353db6cc296289092ffa948e2e1c5f06c0d59.tar.bz2
scala-fb2353db6cc296289092ffa948e2e1c5f06c0d59.zip
Tweaks to Any and AnyRef documentation, courtes...
Tweaks to Any and AnyRef documentation, courtesy of Seth Tisue. No review.
Diffstat (limited to 'src/library-aux')
-rw-r--r--src/library-aux/scala/Any.scala3
-rw-r--r--src/library-aux/scala/AnyRef.scala4
2 files changed, 5 insertions, 2 deletions
diff --git a/src/library-aux/scala/Any.scala b/src/library-aux/scala/Any.scala
index 4611271780..031b7d9d8c 100644
--- a/src/library-aux/scala/Any.scala
+++ b/src/library-aux/scala/Any.scala
@@ -14,7 +14,7 @@ package scala
abstract class Any {
/** Compares the receiver object (`this`) with the argument object (`that`) for equivalence.
*
- * The default implementations of this method is an [[http://en.wikipedia.org/wiki/Equivalence_relation equivalence relation]]:
+ * Any implementation of this method should be an [[http://en.wikipedia.org/wiki/Equivalence_relation equivalence relation]]:
*
* - It is reflexive: for any instance `x` of type `Any`, `x.equals(x)` should return `true`.
* - It is symmetric: for any instances `x` and `y` of type `Any`, `x.equals(y)` should return `true` if and
@@ -61,6 +61,7 @@ abstract class Any {
def getClass(): Class[_]
/** Test two objects for equality.
+ * The expression `x == that` is equivalent to `if (x eq null) that eq null else x.equals(that)`.
*
* @param that the object to compare against this object for equality.
* @return `true` if the receiver object is equivalent to the argument; `false` otherwise.
diff --git a/src/library-aux/scala/AnyRef.scala b/src/library-aux/scala/AnyRef.scala
index 6792ba68b7..1eefb0c806 100644
--- a/src/library-aux/scala/AnyRef.scala
+++ b/src/library-aux/scala/AnyRef.scala
@@ -13,7 +13,9 @@ package scala
*/
trait AnyRef extends Any {
- /** The equality method for reference types. See equals in [[scala.Any]].
+ /** The equality method for reference types. Default implementation delegates to `eq`.
+ *
+ * See also `equals` in [[scala.Any]].
*
* @param that the object to compare against this object for equality.
* @return `true` if the receiver object is equivalent to the argument; `false` otherwise.