mirror of
https://github.com/openjdk/jdk.git
synced 2026-08-03 06:35:31 +00:00
JDK-8389539: Clarify equivalence class sizing with value objects
This commit is contained in:
parent
cc278dbb8a
commit
ee528aef5a
@ -174,8 +174,12 @@ public class Object {
|
||||
* indistinguishable value objects ({@code x == y} has the value
|
||||
* {@code true}).
|
||||
* <p>
|
||||
* In other words, under the object equality equivalence
|
||||
* relation, each equivalence class only has a single element.
|
||||
* Therefore, under the object equality equivalence relation, each
|
||||
* equivalence class only has a single element for identity
|
||||
* classes. For value classes, there is not necessarily a similar
|
||||
* constraint as multiple indistinguishable value objects could be
|
||||
* constructed, depending on the semantics of the particular value
|
||||
* class.
|
||||
*
|
||||
* @apiNote
|
||||
* It is generally necessary to override the {@link #hashCode() hashCode}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user