java.lang.Object
java.lang.Enum<RateType>
javax.money.convert.RateType
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<RateType>
,java.lang.constant.Constable
public enum RateType extends java.lang.Enum<RateType>
This enumeration defines the different type of rates that can be provided by
.ExchangeRateProvider
implementations. Hereby the rate provider's ProviderContext
can
contain
additional information about the rates provided. Similarly, when accessing .ExchangeRateProvider
or CurrencyConversion
instances corresponding attributes can
be passed within an (optional) ConversionContext
.- Author:
- Anatole Tresch, Werner Keil
-
Nested Class Summary
-
Enum Constant Summary
Enum Constants Enum Constant Description ANY
Any type of rates.DEFERRED
Deferred rates are basically also current rates, but have some fixed delay, e.g.HISTORIC
Historic rates, e.g.OTHER
Any other type of rates.REALTIME
Real-time rates should be as adequate as possible, basically not more than a few milliseconds late. -
Method Summary
-
Enum Constant Details
-
HISTORIC
Historic rates, e.g. from the day before or older. -
REALTIME
Real-time rates should be as adequate as possible, basically not more than a few milliseconds late. -
DEFERRED
Deferred rates are basically also current rates, but have some fixed delay, e.g. 20 minutes. -
OTHER
Any other type of rates. You may use theProviderContext
,ConversionContext
to define additional details. -
ANY
Any type of rates. This can be used, where any type of rate is suitable. This may be feasible if you access a specific chain of rate providers, where the order of providers already implies a prioritization and the rate type in that scenario is not relevant.
-
-
Method Details
-
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
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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-