RFR: 8261123: Augment discussion of equivalence classes in Object.equals and comparison methods [v3]
Joe Darcy
darcy at openjdk.java.net
Thu Feb 11 17:41:41 UTC 2021
On Thu, 11 Feb 2021 04:14:08 GMT, Stuart Marks <smarks at openjdk.org> wrote:
>> Joe Darcy has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Fix typos in javadoc tags found during review.
>
> src/java.base/share/classes/java/lang/Comparable.java line 110:
>
>> 108: * {@link Integer#signum signum}{@code (x.compareTo(y)) == -signum(y.compareTo(x))}
>> 109: * for all {@code x} and {@code y}. (This
>> 110: * implies that {@code x.compareTo(y)} must throw an exception iff
>
> I'd suggest replacing "iff" with "if and only if" because it looks like a typo, and writing out the long form emphasizes the bidirectional nature of the implication.
Sure; most of the terminology in the JDK docs aren't very "math-y".
-------------
PR: https://git.openjdk.java.net/jdk/pull/2471
More information about the core-libs-dev
mailing list