javax.money.convert.ExchangeRate . Note that
instances of this class are not thread-safe.
| Modifier and Type | Field and Description |
|---|---|
| pack-priv CurrencyUnit | base
The base (source) currency. |
| pack-priv ConversionContext | |
| pack-priv NumberValue | factor
The conversion factor. |
| pack-priv List | rateChain
The chain of involved rates. |
| pack-priv CurrencyUnit | term
The term (target) currency. |
| Access | Constructor and Description |
|---|---|
| public | ExchangeRateBuilder(String provider, RateType
the rateType)javax. containedSets the exchange rate type |
| public | ExchangeRateBuilder(ConversionContext
the context)javax. to be appliedSets the exchange rate type |
| public | ExchangeRateBuilder(ExchangeRate
the rate)javax. to be appliedSets the exchange rate type |
| Modifier and Type | Method and Description |
|---|---|
| public ExchangeRate | Returns: a new instance ofjavax..Builds a new instance of |
| public ExchangeRateBuilder | Returns: the builder instanceto base (source) base)javax. to be appliedSets the base |
| public ExchangeRateBuilder | Returns: The builder.the conversionContext)javax., not null.Sets the provider to be applied. |
| public ExchangeRateBuilder | Returns: The builder instance.the factor. factor)Sets the conversion factor, as the factor
|
| public ExchangeRateBuilder | Returns: the Builder, for chaining.the base rate rate)Initialize the |
| public ExchangeRateBuilder | Returns: the builder instancethe exchangeRates)javax. chain to be appliedSets the |
| public ExchangeRateBuilder | Returns: the builder instancethe exchangeRates)javax. chain to be appliedSets the |
| public ExchangeRateBuilder | Returns: the builder instanceto terminating term)javax. to be appliedSets the terminating (target) |
| public String |
| base | back to summary |
|---|---|
| pack-priv CurrencyUnit base The base (source) currency. | |
| conversionContext | back to summary |
|---|---|
| pack-priv ConversionContext conversionContext | |
| factor | back to summary |
|---|---|
| pack-priv NumberValue factor The conversion factor. | |
| rateChain | back to summary |
|---|---|
| pack-priv List<ExchangeRate> rateChain The chain of involved rates. | |
| term | back to summary |
|---|---|
| pack-priv CurrencyUnit term The term (target) currency. | |
| ExchangeRateBuilder | back to summary |
|---|---|
| public ExchangeRateBuilder(String provider, RateType rateType) Sets the exchange rate type
| |
| ExchangeRateBuilder | back to summary |
|---|---|
| public ExchangeRateBuilder(ConversionContext context) Sets the exchange rate type
| |
| ExchangeRateBuilder | back to summary |
|---|---|
| public ExchangeRateBuilder(ExchangeRate rate) Sets the exchange rate type
| |
| build | back to summary |
|---|---|
| public ExchangeRate build() Builds a new instance of
| |
| setBase | back to summary |
|---|---|
| public ExchangeRateBuilder setBase(CurrencyUnit base) Sets the base
| |
| setContext | back to summary |
|---|---|
| public ExchangeRateBuilder setContext(ConversionContext conversionContext) Sets the provider to be applied.
| |
| setFactor | back to summary |
|---|---|
| public ExchangeRateBuilder setFactor(NumberValue factor) Sets the conversion factor, as the factor
| |
| setRate | back to summary |
|---|---|
| public ExchangeRateBuilder setRate(ExchangeRate rate) Initialize the
| |
| setRateChain | back to summary |
|---|---|
| public ExchangeRateBuilder setRateChain(ExchangeRate... exchangeRates) Sets the
| |
| setRateChain | back to summary |
|---|---|
| public ExchangeRateBuilder setRateChain(List<ExchangeRate> exchangeRates) Sets the
| |
| setTerm | back to summary |
|---|---|
| public ExchangeRateBuilder setTerm(CurrencyUnit term) Sets the terminating (target)
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non-
| |