Top Description Constructors Methods
javax.money

public final Class CurrencyQueryBuilder

extends AbstractQueryBuilder<CurrencyQueryBuilder, CurrencyQuery>
Class Inheritance
Imports
java.util.Arrays, .Locale, .Objects, java.util.stream.Collectors

Builder for queries for accessing javax.money.CurrencyUnit instances. If not properties are set the query should returns the default currencies. Similarly if no provider is set explicitly the default ISO currencies as returned by java.util.Currency should be returned.

Note this class is NOT thread-safe.

Constructor Summary

AccessConstructor and Description
private
CurrencyQueryBuilder()

Default constructor.

private
CurrencyQueryBuilder(CurrencyQuery
javax.money.CurrencyQuery used for initializing this builder.
currencyQuery
)

Creates a new instance of javax.money.CurrencyQueryBuilder.

Method Summary

Modifier and TypeMethod and Description
public CurrencyQuery

Returns:

a new javax.money.CurrencyQuery instance, never null.
build
()

Implements abstract javax.money.AbstractQueryBuilder.build.

Creates a new instance of javax.money.CurrencyQuery.
public static CurrencyQueryBuilder

Returns:

a new javax.money.CurrencyQueryBuilder instance, never null.
of
()

Creates a new instance of javax.money.CurrencyQueryBuilder.

public static CurrencyQueryBuilder

Returns:

a new javax.money.CurrencyQueryBuilder instance, never null.
of
(CurrencyQuery
javax.money.CurrencyQuery used for initializing this builder.
currencyQuery
)

Creates a new instance of javax.money.CurrencyQueryBuilder.

public CurrencyQueryBuilder

Returns:

the query for chaining.
setCountries
(Locale...
The ISO countries.
countries
)

Sets the country for which currencies should be requested.

public CurrencyQueryBuilder

Returns:

the query for chaining.
setCurrencyCodes
(String...
the currency codes or code expressions, not null.
codes
)

Sets the currency code, or the regular expression to select codes.

public CurrencyQueryBuilder

Returns:

the query for chaining.
setNumericCodes
(int...
the numeric codes.
codes
)

Set the numeric code.

Inherited from javax.money.AbstractQueryBuilder:
setsetProviderNamesetProviderNamessetProviderNamessetTargetType

Constructor Detail

CurrencyQueryBuilderback to summary
private CurrencyQueryBuilder()

Default constructor.

CurrencyQueryBuilderback to summary
private CurrencyQueryBuilder(CurrencyQuery currencyQuery)

Creates a new instance of javax.money.CurrencyQueryBuilder.

Parameters
currencyQuery:CurrencyQuery

javax.money.CurrencyQuery used for initializing this builder.

Method Detail

buildback to summary
public CurrencyQuery build()

Implements abstract javax.money.AbstractQueryBuilder.build.

Creates a new instance of javax.money.CurrencyQuery.

Returns:CurrencyQuery

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

ofback to summary
public static CurrencyQueryBuilder of()

Creates a new instance of javax.money.CurrencyQueryBuilder.

Returns:CurrencyQueryBuilder

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

ofback to summary
public static CurrencyQueryBuilder of(CurrencyQuery currencyQuery)

Creates a new instance of javax.money.CurrencyQueryBuilder.

Parameters
currencyQuery:CurrencyQuery

javax.money.CurrencyQuery used for initializing this builder.

Returns:CurrencyQueryBuilder

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

setCountriesback to summary
public CurrencyQueryBuilder setCountries(Locale... countries)

Sets the country for which currencies should be requested.

Parameters
countries:Locale[]

The ISO countries.

Returns:CurrencyQueryBuilder

the query for chaining.

setCurrencyCodesback to summary
public CurrencyQueryBuilder setCurrencyCodes(String... codes)

Sets the currency code, or the regular expression to select codes.

Parameters
codes:String[]

the currency codes or code expressions, not null.

Returns:CurrencyQueryBuilder

the query for chaining.

setNumericCodesback to summary
public CurrencyQueryBuilder setNumericCodes(int... codes)

Set the numeric code. Setting it to -1 search for currencies that have no numeric code.

Parameters
codes:int[]

the numeric codes.

Returns:CurrencyQueryBuilder

the query for chaining.