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 of
CurrencyUnit instances. 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 the CurrencyProviderSpi.
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
-
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 Details
-
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.
-