DoubleBuffer.compareTo is not anti-symmetric
Martin Buchholz
martinrb at google.com
Wed Nov 25 19:03:41 PST 2009
On Wed, Nov 25, 2009 at 06:40, Alan Bateman <Alan.Bateman at sun.com> wrote:
> Martin Buchholz wrote:
>>
>> :
>> I improved the spec to make it hopefully less clumsy,
>> and added some more tests as well.
>>
>
> It is better. One small comment on equals is that it might be better if the
> "Unlike ..." statement were changed slightly to say that the method
> considers positive zero and negative zero to be equal before
> {Float,Double}.equals is mentioned. That way the mention of the difference
> is more of a "by the way" and the reader don't have to follow the link.
Reworded to reverse order.
> In compareTo, it might be better if we changed "This method compares two XXX
> values as if by ..." to "Elements are compared as if by ..." (just a
> suggestion to make it make it follow the second paragraph a bit better).
I changed one occurrence of "values" to "elements".
You may have noticed that much of my javadoc was taken from Double.java.
Martin
More information about the nio-dev
mailing list