public final class RoundingContextBuilder extends AbstractContextBuilder<RoundingContextBuilder,RoundingContext>
RoundingContext
adding detailed information
about a MonetaryRounding
instance.
Note this class is NOT thread-safe.
()
Modifier and Type | Method and Description |
---|---|
RoundingContext |
build()
Creates a new instance of
RoundingContext . |
static RoundingContextBuilder |
of(RoundingContext roundingContext)
Creates a new RoundingContextBuilder.
|
static RoundingContextBuilder |
of(String provider,
String roundingId)
Creates a new RoundingContextBuilder.
|
RoundingContextBuilder |
setCurrency(CurrencyUnit currencyUnit)
Get the basic
CurrencyUnit , which is based for this rounding type. |
importContext, importContext, removeAttributes, set, set, set, set, set, set, set, set, set, setProviderName, toString
public RoundingContextBuilder setCurrency(CurrencyUnit currencyUnit)
CurrencyUnit
, which is based for this rounding type.public RoundingContext build()
RoundingContext
.build
in class AbstractContextBuilder<RoundingContextBuilder,RoundingContext>
RoundingContext
instance.public static RoundingContextBuilder of(String provider, String roundingId)
provider
- the provider name, creating the corresponding MonetaryRounding
containing, not null.
the final RoundingContext
created by this builder, not null.roundingId
- The name of the rounding, not null.MonetaryContextBuilder
instance, never null.public static RoundingContextBuilder of(RoundingContext roundingContext)
roundingContext
- the rounding context, used as a template, not null.MonetaryContextBuilder
instance, never null.Copyright © 2012–2016 JSR 354 - Expert Group. All rights reserved.