Enum ExchangeRateType

java.lang.Object
java.lang.Enum<ExchangeRateType>
org.javamoney.moneta.convert.ExchangeRateType
All Implemented Interfaces:
Serializable, Comparable<ExchangeRateType>, ExchangeRateProviderSupplier

This enum contains all implementations by Moneta. Using this enum will easier to choose an available implementation.

ExchangeRateProvider provider = MonetaryConversions.getExchangeRateProvider(ExchangeRateType.ECB);
Since:
1.0.1
Author:
otaviojava, Werner Keil
  • Enum Constant Details

    • ECB

      public static final ExchangeRateType ECB
      Exchange rate to the European Central Bank. Uses the ECBCurrentRateProvider implementation.
    • IMF

      public static final ExchangeRateType IMF
      Exchange rate to the International Monetary Fund. Uses the IMFRateProvider implementation.
    • IMF_HIST

      public static final ExchangeRateType IMF_HIST
      Exchange rate to the International Monetary Fund from historic. Uses the IMFHistoricRateProvider implementation.
    • ECB_HIST90

      public static final ExchangeRateType ECB_HIST90
      Exchange rate to European Central Bank (last 90 days). Uses the ECBHistoric90RateProvider implementation.
    • ECB_HIST

      public static final ExchangeRateType ECB_HIST
      Uses the ECBHistoricRateProvider implementation.
    • IDENTITY

      public static final ExchangeRateType IDENTITY
      Uses the IdentityRateProvider implementation.
  • Method Details

    • values

      public static ExchangeRateType[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static ExchangeRateType valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • get

      public String get()
      Specified by:
      get in interface ExchangeRateProviderSupplier
    • getDescription