divide

open override fun divide(divisor: Long): Geldbetrag
open override fun divide(divisor: Double): MonetaryAmount
open override fun divide(divisor: Number?): Geldbetrag

Returns a MonetaryAmount whose value is this / divisor, and whose preferred scale is this.scale() - divisor.scale(); if the exact quotient cannot be represented an ArithmeticException is thrown.

Return

this / divisor

Parameters

divisor

value by which this MonetaryAmount is to be divided.

Throws

if the exact quotient does not have a terminating decimal expansion, or if the result exceeds the numeric capabilities of this implementation class, i.e. the MonetaryContext cannot be adapted as required.