Companion

object Companion

Functions

Link copied to clipboard
fun <T : Any, P : Any> fromDecimal(displayQuantityDelta: BigDecimal, token: T, source: P, destination: P, rounding: RoundingMode = RoundingMode.DOWN): AmountTransfer<T, P>

Construct an AmountTransfer object from an indicative/displayable BigDecimal source, applying rounding as specified. The token size is determined from the token type and is the same as for Amount of the same token.

Link copied to clipboard
fun <T : Any, P : Any> zero(token: T, source: P, destination: P): AmountTransfer<T, P>

Helper to make a zero size AmountTransfer.