public final class ProviderContext extends AbstractContext
ExchangeRate
s a .ExchangeRateProvider
delivers, including the provider's name, rate type and additional data.
By default such a context supports the following attributes:
RateType
an ExchangeRateProvider supportsInstances of this class are immutable and thread-safe.
KEY_PROVIDER
Modifier and Type | Method and Description |
---|---|
Set<RateType> |
getRateTypes()
Get the deferred flag.
|
static ProviderContext |
of(String provider)
Creates a new ProviderContext based on the provider id and rate type(s).
|
static ProviderContext |
of(String provider,
RateType rateType,
RateType... rateTypes)
Creates a new ProviderContext based on the provider id and rate type(s).
|
ProviderContextBuilder |
toBuilder()
Creates a
ProviderContextBuilder initialized with this instance's data. |
public Set<RateType> getRateTypes()
public ProviderContextBuilder toBuilder()
ProviderContextBuilder
initialized with this instance's data.ProviderContextBuilder
, never null
.public static ProviderContext of(String provider, RateType rateType, RateType... rateTypes)
provider
- the provider id, not null.rateTypes
- the required RateType
s, not nullProviderContext
instance.public static ProviderContext of(String provider)
provider
- the provider id, not null.ProviderContext
instance.Copyright © 2012–2016 JSR 354 - Expert Group. All rights reserved.