Class Amount

    • Constructor Detail

      • Amount

        public Amount​(int amount,
                      Currency currency)
        Create amount using minor units.
      • Amount

        public Amount​(int amount,
                      Currency currency,
                      int exponent)
        Create amount using minor units.
      • Amount

        public Amount​(long amount,
                      Currency currency)
        Create amount using minor units.
      • Amount

        public Amount​(long amount,
                      Currency currency,
                      int exponent)
        Create amount using minor units.
      • Amount

        public Amount​(double amount,
                      Currency currency)
        Create amount using major units.
      • Amount

        public Amount​(double amount,
                      Currency currency,
                      int exponent)
        Create amount using major units and custom exponent.
      • Amount

        public Amount​(Amount amount)
        Create copy of amount.
      • Amount

        public Amount​(com.six.timapi.internal.TimSavedState savedState)
        For internal use only.
    • Method Detail

      • getIntAmount

        public int getIntAmount()
        Amount in minor units as integer value.
      • setIntAmount

        public void setIntAmount​(int amount)
        Set amount in minor units as integer value.
      • getAmount

        public long getAmount()
        Amount in minor units as integer value.
      • setAmount

        public void setAmount​(long amount)
        Set amount in minor units as integer value.
      • getDecimalValue

        public double getDecimalValue()
        Amount in major units as floating point value.
      • setDecimalValue

        public void setDecimalValue​(double value)
        Set amount in major units as floating point value.
      • getCurrency

        public Currency getCurrency()
        Currency to use for transaction.
      • setCurrency

        public void setCurrency​(Currency currency)
        Set currency to use for transaction. Also sets the exponent.
      • getExponent

        public int getExponent()
        Exponent.
      • setExponent

        public void setExponent​(int exponent)
        Set exponent.
      • toString

        public String toString()
        String representation for debugging purpose.
        Overrides:
        toString in class Object
      • createSavedState

        public com.six.timapi.internal.TimSavedState createSavedState​(String name)
        For internal use only.