numberValueExact

open override fun <T : Number> numberValueExact(numberType: Class<T>): T

Access the numeric value as Number. Hereby no truncation will be performed to fit the value into the target data type.

Return

the (possibly) truncated value of the MonetaryAmount's.

Parameters

numberType

The concrete number class to be returned. Basically the following Number types, must be supported if available on the corresponding runtime platform:

  • java.lang.Long

  • java.lang.Double

  • java.lang.Number

  • java.math.BigInteger, currently not available on all platforms.

  • java.math.BigDecimal, currently not available on all platforms.

Throws

If the value must be truncated to fit the target datatype.