Class Currency

java.lang.Object
de.hybris.order.calculation.money.Currency

public class Currency extends Object
Currency object to be used from inside the calculation framework. It simply combines a code and the number of digits available for that currency. Actually this class only exists because Currency does not support creation of artificial currencies.
  • Constructor Details

    • Currency

      public Currency(String isocode, int digits)
      Creates a new currency with given iso code and digits.
  • Method Details

    • valueOf

      public static Currency valueOf(String code, int digits)
      Shortcut for getting commonly used currency instances. Prefer this to Currency(String, int) since this method caches instances.
    • equals

      public boolean equals(Object obj)
      A Currency is equal to an object if this object is also a Currency and this currency has the same digit count and the isocode is equal (ignore case) to the other isocode.
      Overrides:
      equals in class Object
    • hashCode

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

      public String toString()
      Overrides:
      toString in class Object
    • getIsoCode

      public String getIsoCode()
    • getDigits

      public int getDigits()