jsr354-api icon indicating copy to clipboard operation
jsr354-api copied to clipboard

NumberValue should have a bigDecimalValue() method

Open msgilligan opened this issue 5 years ago • 1 comments

It would be really helpful if NumberValue provided a bigDecimalValue() getter. Since the two most common implementations of NumberValue are BigDecimal and long (as well as the two most common standard types that users will be converting to/from) it would be really helpful to be able to write:

BigDecimal standardJavaNumber = myNumberValue.bigDecimalValue()

instead of:

BigDecimal standardJavaNumber = myNumberValue.numberValue(BigDecimal.class)

msgilligan avatar Jul 12 '20 17:07 msgilligan

That's for a new JSR, @msgilligan you're more than welcome to join a proposed EG, I assume it could happen around the end of the year, certainly not before the summer break.

keilw avatar Jul 12 '20 17:07 keilw