File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ package scala
1414abstract class Any {
1515 /** Compares the receiver object (`this`) with the argument object (`that`) for equivalence.
1616 *
17- * The default implementations of this method is an [[http://en.wikipedia.org/wiki/Equivalence_relation equivalence relation ]]:
17+ * Any implementation of this method should be an [[http://en.wikipedia.org/wiki/Equivalence_relation equivalence relation ]]:
1818 *
1919 * - It is reflexive: for any instance `x` of type `Any`, `x.equals(x)` should return `true`.
2020 * - 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 {
6161 def getClass (): Class [_]
6262
6363 /** Test two objects for equality.
64+ * The expression `x == that` is equivalent to `if (x eq null) that eq null else x.equals(that)`.
6465 *
6566 * @param that the object to compare against this object for equality.
6667 * @return `true` if the receiver object is equivalent to the argument; `false` otherwise.
Original file line number Diff line number Diff line change @@ -13,7 +13,9 @@ package scala
1313 */
1414trait AnyRef extends Any {
1515
16- /** The equality method for reference types. See equals in [[scala.Any ]].
16+ /** The equality method for reference types. Default implementation delegates to `eq`.
17+ *
18+ * See also `equals` in [[scala.Any ]].
1719 *
1820 * @param that the object to compare against this object for equality.
1921 * @return `true` if the receiver object is equivalent to the argument; `false` otherwise.
You can’t perform that action at this time.
0 commit comments