Top Description Fields Constructors Methods
javax.money

public final Class CurrencyContextBuilder

extends AbstractContextBuilder<CurrencyContextBuilder, CurrencyContext>
Class Inheritance
Imports
java.util.Objects

Builder class for creating new instances of CurrencyContext adding detailed information about a CurrencyUnit instance. Typically the contexts are created and assigned by the classes that implement the javax.money.spi.CurrencyProviderSpi. The according implementation classes should document, which attributes are available.

Note this class is NOT thread-safe.

See Also
javax.money.CurrencyUnit#getContext()

Field Summary

Inherited from javax.money.AbstractContextBuilder:
data

Constructor Summary

AccessConstructor and Description
private
CurrencyContextBuilder(String
the provider name, creating the corresponding CurrencyUnit containing the final CurrencyContext created by this builder, not null.
provider
)

Creates a new builder.

private
CurrencyContextBuilder(CurrencyContext
the javax.money.CurrencyContext to be used for initializing this builder.
context
)

Creates a new builder.

Method Summary

Modifier and TypeMethod and Description
public CurrencyContext

Returns:

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

Implements abstract javax.money.AbstractContextBuilder.build.

Creates a new instance of javax.money.CurrencyContext.
public static CurrencyContextBuilder

Returns:

a new javax.money.CurrencyContextBuilder instance, never null.
of
(String
the provider name, creating the corresponding CurrencyUnit containing the final CurrencyContext created by this builder, not null.
provider
)

Creates a new builder.

public static CurrencyContextBuilder

Returns:

a new javax.money.CurrencyContextBuilder instance, never null.
of
(CurrencyContext
the javax.money.CurrencyContext to be used for initializing this builder.
context
)

Creates a new builder.

Inherited from javax.money.AbstractContextBuilder:
importContextimportContextremoveAttributessetsetsetsetsetsetsetsetsetsetProviderNametoString

Constructor Detail

CurrencyContextBuilderback to summary
private CurrencyContextBuilder(String provider)

Creates a new builder.

Parameters
provider:String

the provider name, creating the corresponding CurrencyUnit containing the final CurrencyContext created by this builder, not null.

CurrencyContextBuilderback to summary
private CurrencyContextBuilder(CurrencyContext context)

Creates a new builder.

Parameters
context:CurrencyContext

the javax.money.CurrencyContext to be used for initializing this builder.

Method Detail

buildback to summary
public CurrencyContext build()

Implements abstract javax.money.AbstractContextBuilder.build.

Creates a new instance of javax.money.CurrencyContext.

Returns:CurrencyContext

a new javax.money.CurrencyContext instance.

Annotations
@Override
ofback to summary
public static CurrencyContextBuilder of(String provider)

Creates a new builder.

Parameters
provider:String

the provider name, creating the corresponding CurrencyUnit containing the final CurrencyContext created by this builder, not null.

Returns:CurrencyContextBuilder

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

ofback to summary
public static CurrencyContextBuilder of(CurrencyContext context)

Creates a new builder.

Parameters
context:CurrencyContext

the javax.money.CurrencyContext to be used for initializing this builder.

Returns:CurrencyContextBuilder

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