Object AmountTransfer.Companion

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • 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 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.
      • zero

         final <T extends Any, P extends Any> AmountTransfer<T, P> zero(T token, P source, P destination)

        Helper to make a zero size AmountTransfer.