Documentation of methods in java.lang.Number

Brian Burkhalter brian.burkhalter at
Wed Dec 17 17:56:58 UTC 2014

On Dec 17, 2014, at 2:26 AM, Andreas Lundblad <andreas.lundblad at> wrote:

> Right. As it stands now the class level description says "the semantics of the conversion is defined by the Number implementation in question", and then the documentation of longValue narrows this down to "rounding or truncation". By adding "or some other narrowing conversion" we make room for the BigDecimal/BigInteger implementations, but I would argue that it's still more constrained than the class level description.
> Another suggestion would be:
> "Returns the value of the specified number as a {@code long}. The specific semantics of the conversion is defined by the subclass in question."

This seems reasonable to me. I’ll put together a patch to this effect unless there are other suggestions.



More information about the core-libs-dev mailing list