- java.lang.Object
-
- javax.money.AbstractContext
-
- javax.money.CurrencyContext
-
- All Implemented Interfaces:
java.io.Serializable
public final class CurrencyContext extends AbstractContext implements java.io.Serializable
This class models the attributable context ofCurrencyUnitinstances. It provides information about- the provider that provided the instance (required)
- the target timestamp / temporal unit
- any other attributes, identified by the attribute type, e.g. regions, tenants etc.
Instances of this class must be created using the
CurrencyContextBuilder. Typically the contexts are created and assigned by the classes that implement theCurrencyProviderSpi. The according implementation classes should document, which attributes are available.This class is immutable, serializable and thread-safe.
- Author:
- Anatole Tresch
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class javax.money.AbstractContext
KEY_PROVIDER
-
-
Method Summary
Modifier and Type Method Description CurrencyContextBuildertoBuilder()Allows to convert a instance into the correspondingCurrencyContextBuilder, which allows to change the values and of anotherCurrencyContextinstance.
-
-
-
Method Detail
-
toBuilder
public CurrencyContextBuilder toBuilder()
Allows to convert a instance into the correspondingCurrencyContextBuilder, which allows to change the values and of anotherCurrencyContextinstance.- Returns:
- a new Builder instance, preinitialized with the values from this instance.
-
-