RFR: JDK-8295236: Update JavaDoc in javafx.geometry.Point3D [v3]
Nir Lisker
nlisker at openjdk.org
Tue Oct 18 11:34:12 UTC 2022
On Tue, 18 Oct 2022 04:47:38 GMT, Ambarish Rapte <arapte at openjdk.org> wrote:
>> I think that we should explain what makes 2 objects equal. Even if we don't explicitly name the methods used for comparison, we could say "2 points are equals if their coordinates are equal".
>>
>> By the way, I have https://bugs.openjdk.org/browse/JDK-8226930 assigned to go over some dubious equals/hashcode implementations, in case you want to delegate the task.
>
> Agreed, mentioning equality criteria sounds good to me too. How does this look ?
>
>
> /**
> * Indicates whether some other object is "equal to" this one.
> * Two instances of Point3D are equal if the return values of their
> * {@code getX}, {@code getY}, and {@code getZ} methods are equal.
> *
> * @param obj the reference object with which to compare
> * @return true if this Point3D is the same as the obj argument; false otherwise
> */
This is the current proposal by Douglas and align with `Object::equals` which it is overriding. I'm fine with this wording. Just need to add the `@code` tags.
-------------
PR: https://git.openjdk.org/jfx/pull/913
More information about the openjfx-dev
mailing list