Top Description Fields Constructors Methods
javax.money

public final Class RoundingContextBuilder

extends AbstractContextBuilder<RoundingContextBuilder, RoundingContext>
Class Inheritance
Imports
java.util.Objects

Builder class for creating new instances of RoundingContext adding detailed information about a MonetaryRounding instance.

Note this class is NOT thread-safe.

See Also
()

Field Summary

Inherited from javax.money.AbstractContextBuilder:
data

Constructor Summary

AccessConstructor and Description
private
RoundingContextBuilder(String
the provider name, creating the corresponding MonetaryRounding containing, not null. the final RoundingContext created by this builder, not null.
provider
,
String
The name of the rounding, not null.
roundingId
)

Creates a new builder.

private
RoundingContextBuilder(RoundingContext
the rounding context, used as a template, not null.
roundingContext
)

Creates a new RoundingContextBuilder.

Method Summary

Modifier and TypeMethod and Description
public RoundingContext

Returns:

a new javax.money.RoundingContext instance.
build
()

Implements abstract javax.money.AbstractContextBuilder.build.

Creates a new instance of javax.money.RoundingContext.
public static RoundingContextBuilder

Returns:

a new javax.money.MonetaryContextBuilder instance, never null.
of
(String
the provider name, creating the corresponding MonetaryRounding containing, not null. the final RoundingContext created by this builder, not null.
provider
,
String
The name of the rounding, not null.
roundingId
)

Creates a new RoundingContextBuilder.

public static RoundingContextBuilder

Returns:

a new javax.money.MonetaryContextBuilder instance, never null.
of
(RoundingContext
the rounding context, used as a template, not null.
roundingContext
)

Creates a new RoundingContextBuilder.

public RoundingContextBuilder

Returns:

the target CurrencyUnit, or null.
setCurrency
(CurrencyUnit
the target currency unit not null.
currencyUnit
)

Get the basic CurrencyUnit, which is based for this rounding type.

Inherited from javax.money.AbstractContextBuilder:
importContextimportContextremoveAttributessetsetsetsetsetsetsetsetsetsetProviderNametoString

Constructor Detail

RoundingContextBuilderback to summary
private RoundingContextBuilder(String provider, String roundingId)

Creates a new builder.

Parameters
provider:String

the provider name, creating the corresponding MonetaryRounding containing, not null. the final RoundingContext created by this builder, not null.

roundingId:String

The name of the rounding, not null.

RoundingContextBuilderback to summary
private RoundingContextBuilder(RoundingContext roundingContext)

Creates a new RoundingContextBuilder.

Parameters
roundingContext:RoundingContext

the rounding context, used as a template, not null.

Method Detail

buildback to summary
public RoundingContext build()

Implements abstract javax.money.AbstractContextBuilder.build.

Creates a new instance of javax.money.RoundingContext.

Returns:RoundingContext

a new javax.money.RoundingContext instance.

Annotations
@Override
ofback to summary
public static RoundingContextBuilder of(String provider, String roundingId)

Creates a new RoundingContextBuilder.

Parameters
provider:String

the provider name, creating the corresponding MonetaryRounding containing, not null. the final RoundingContext created by this builder, not null.

roundingId:String

The name of the rounding, not null.

Returns:RoundingContextBuilder

a new javax.money.MonetaryContextBuilder instance, never null.

ofback to summary
public static RoundingContextBuilder of(RoundingContext roundingContext)

Creates a new RoundingContextBuilder.

Parameters
roundingContext:RoundingContext

the rounding context, used as a template, not null.

Returns:RoundingContextBuilder

a new javax.money.MonetaryContextBuilder instance, never null.

setCurrencyback to summary
public RoundingContextBuilder setCurrency(CurrencyUnit currencyUnit)

Get the basic CurrencyUnit, which is based for this rounding type.

Parameters
currencyUnit:CurrencyUnit

the target currency unit not null.

Returns:RoundingContextBuilder

the target CurrencyUnit, or null.