BuildableCurrencyUnit using a fluent
API.
| Modifier and Type | Field and Description |
|---|---|
| pack-priv String | currencyCode
The currency code. |
| pack-priv CurrencyContext | currencyContext
The currency's context. |
| pack-priv int | defaultFractionDigits
The default fraction digits. |
| pack-priv int | numericCode
The (optional) numeric code. |
| Access | Constructor and Description |
|---|---|
| private | |
| private | CurrencyUnitBuilder(String
the (unique) and identifying currency code, not null. currencyCode, CurrencyContext currencyContext)Creates a new Builder. |
| Modifier and Type | Method and Description |
|---|---|
| public CurrencyUnit | |
| public CurrencyUnit | Returns: the new CurrencyUnit instance.if register)true the instance created is published so it is accessible from
the Monetary singleton.Returns a new instance of |
| public CurrencyUnit | Returns: the new CurrencyUnit instance.if register, Locale true the instance created is published so it is accessible from
the Monetary singleton.country Locale for making the currency for the given country. locale)Returns a new instance of |
| public static CurrencyUnitBuilder | of(String
the (unique) and identifying currency code, not null. currencyCode, CurrencyContext The currency context to be used. currencyContext)Creates a new CurrencyUnitBuilder. |
| public static CurrencyUnitBuilder | |
| public CurrencyUnitBuilder | Returns: the Builder, for chaining.the (unique) and identifying currency code, not null. currencyCode)Allows to set the currency code, for creating multiple instances, using one Builder. |
| public CurrencyUnitBuilder | Returns: the Builder, for chaining.the default fraction digits, >= 0. defaultFractionDigits)Set the default fraction digits. |
| public CurrencyUnitBuilder | Returns: the Builder, for chaining.The numeric currency code, >= -1. .1 hereby means undefined. numericCode)Set the numeric code (optional). |
| currencyCode | back to summary |
|---|---|
| pack-priv String currencyCode The currency code. | |
| currencyContext | back to summary |
|---|---|
| pack-priv CurrencyContext currencyContext The currency's context. | |
| defaultFractionDigits | back to summary |
|---|---|
| pack-priv int defaultFractionDigits The default fraction digits. | |
| numericCode | back to summary |
|---|---|
| pack-priv int numericCode The (optional) numeric code. | |
| CurrencyUnitBuilder | back to summary |
|---|---|
| private CurrencyUnitBuilder() Private constructor, use #of() methods. | |
| CurrencyUnitBuilder | back to summary |
|---|---|
| private CurrencyUnitBuilder(String currencyCode, CurrencyContext currencyContext) Creates a new Builder.
| |
| build | back to summary |
|---|---|
| public CurrencyUnit build() Returns a new instance of
| |
| build | back to summary |
|---|---|
| public CurrencyUnit build(boolean register) Returns a new instance of
| |
| build | back to summary |
|---|---|
| public CurrencyUnit build(boolean register, Locale locale) Returns a new instance of
| |
| of | back to summary |
|---|---|
| public static CurrencyUnitBuilder of(String currencyCode, CurrencyContext currencyContext) Creates a new CurrencyUnitBuilder.
| |
| of | back to summary |
|---|---|
| public static CurrencyUnitBuilder of(String currencyCode, String providerName) Creates a new CurrencyUnitBuilder, creates a simple CurrencyContext using the given provider name. | |
| setCurrencyCode | back to summary |
|---|---|
| public CurrencyUnitBuilder setCurrencyCode(String currencyCode) Allows to set the currency code, for creating multiple instances, using one Builder.
| |
| setDefaultFractionDigits | back to summary |
|---|---|
| public CurrencyUnitBuilder setDefaultFractionDigits(int defaultFractionDigits) Set the default fraction digits.
| |
| setNumericCode | back to summary |
|---|---|
| public CurrencyUnitBuilder setNumericCode(int numericCode) Set the numeric code (optional).
| |