public final class ConversionContextBuilder extends AbstractContextBuilder<ConversionContextBuilder,ConversionContext>
ConversionContext
instances. Instances of
this class are not thread-safe.Constructor and Description |
---|
ConversionContextBuilder()
Create a new Builder instance without any provider, e.g.
|
Modifier and Type | Method and Description |
---|---|
ConversionContext |
build()
Creates a new
ConversionContext with the data from this
Builder instance. |
static ConversionContextBuilder |
create(ProviderContext context,
RateType rateType)
Create a new Builder, hereby using the given
ConversionContext 's values as defaults. |
static ConversionContextBuilder |
of()
Creates a new
ConversionContextBuilder instance. |
static ConversionContextBuilder |
of(ConversionContext conversionContext)
Creates a new
ConversionContextBuilder instance. |
ConversionContextBuilder |
setRateType(RateType rateType)
Set the historic value.
|
importContext, importContext, removeAttributes, set, set, set, set, set, set, set, set, set, setProviderName, toString
public ConversionContextBuilder()
ConversionContext
instances for querying.public ConversionContextBuilder setRateType(RateType rateType)
rateType
- the rate typepublic ConversionContext build()
ConversionContext
with the data from this
Builder instance.build
in class AbstractContextBuilder<ConversionContextBuilder,ConversionContext>
ConversionContext
. never null
.public static ConversionContextBuilder of(ConversionContext conversionContext)
ConversionContextBuilder
instance.conversionContext
- the conversion context to be used to initialize the new builder instance, not null.ConversionContextBuilder
instance, never null.public static ConversionContextBuilder of()
ConversionContextBuilder
instance.ConversionContextBuilder
instance, never null.public static ConversionContextBuilder create(ProviderContext context, RateType rateType)
ConversionContext
's values as defaults. This allows changing
an existing ConversionContext
easily.context
- the provider context, not null
rateType
- the rate type, not null.ConversionContextBuilder
instance, never null.Copyright © 2012–2016 JSR 354 - Expert Group. All rights reserved.