corda / net.corda.core.contracts / Amount / minus

minus

operator fun minus(other: Amount<T>): Amount<T>

A checked subtraction operator is supported to simplify netting of Amounts.

Exceptions

ArithmeticException - if there is numeric underflow.

IllegalArgumentException - if this leads to the amount going negative, or would mix non-identical token types.