Class FormattedAmount


  • public class FormattedAmount
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      FormattedAmount​(java.math.BigDecimal amount, java.lang.String currency, int dps)  
    • Constructor Detail

      • FormattedAmount

        public FormattedAmount​(@Nonnull
                               java.math.BigDecimal amount,
                               @Nonnull
                               java.lang.String currency,
                               int dps)
        Parameters:
        amount - The amount, e.g. 1234.50
        currency - The currency, e.g. GBP
        dps - The number of decimal places of the amount, e.g. 2
    • Method Detail

      • getAmount

        @Nonnull
        public java.math.BigDecimal getAmount()
      • getCurrency

        @Nonnull
        public java.lang.String getCurrency()
      • getDps

        public int getDps()
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object