AmountTransfer.fromDecimal - corda

corda / net.corda.core.contracts / AmountTransfer / fromDecimal

# fromDecimal

`@JvmStatic @JvmOverloads 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.

### Parameters

`displayQuantityDelta` - is the signed amount to transfer between source and destination in displayable units. Positive values mean transfers from source to destination. Negative values mean transfers from destination to source.

`token` - defines the asset being represented in the transfer. The token should implement TokenizableAssetInfo if custom conversion logic is required.

`source` - The payer of the transfer if displayQuantityDelta is positive, the payee if displayQuantityDelta is negative

`destination` - The payee of the transfer if displayQuantityDelta is positive, the payer if displayQuantityDelta is negative

`rounding` - The mode of rounding to apply after scaling to integer token units.