Package net.corda.core.contracts
Object AmountTransfer.Companion
-
- All Implemented Interfaces:
public class AmountTransfer.Companion
-
-
Field Summary
Fields Modifier and Type Field Description public final static AmountTransfer.Companion
INSTANCE
-
Method Summary
Modifier and Type Method Description final <T extends Any, P extends Any> AmountTransfer<T, P>
fromDecimal(BigDecimal displayQuantityDelta, T token, P source, P destination, RoundingMode rounding)
Construct an AmountTransfer object from an indicative/displayable BigDecimal source, applying rounding as specified. final <T extends Any, P extends Any> AmountTransfer<T, P>
zero(T token, P source, P destination)
Helper to make a zero size AmountTransfer. -
-
Method Detail
-
fromDecimal
final <T extends Any, P extends Any> AmountTransfer<T, P> fromDecimal(BigDecimal displayQuantityDelta, T token, P source, P destination, RoundingMode rounding)
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.token
- defines the asset being represented in the transfer.source
- The payer of the transfer if displayQuantityDelta is positive, the payee if displayQuantityDelta is negativedestination
- The payee of the transfer if displayQuantityDelta is positive, the payer if displayQuantityDelta is negativerounding
- The mode of rounding to apply after scaling to integer token units.
-
-
-
-