Interface RegionLocaleIdentifier
- All Superinterfaces:
BraveAPIConstant,ProvidedOption,SearchOption
- All Known Implementing Classes:
MarketLocale
An interface representing a region-locale identifier.
This interface is implemented by enums that represent region-locale identifiers.
Each region-locale identifier has a BraveAPIConstant.value() method that is used to get the parameter
value for the API requests.
Each region-locale identifier has a URL_PARAM that is used to get the URL parameter
for the API requests.
- See Also:
-
Field Summary
FieldsFields inherited from interface net.ygbstudio.jbrave.core.domain.BraveAPIConstant
SEARCH_API_BASEFields inherited from interface net.ygbstudio.jbrave.core.domain.ProvidedOption
UNITS -
Method Summary
Modifier and TypeMethodDescriptionConverts this region locale identifier to aSearchOptionCarrierthat can be used to build a URL parameter.static @NotNull StringurlParam(@NotNull RegionLocaleIdentifier regionLocaleIdentifier) Generates the URL parameter for this language identifier.Methods inherited from interface net.ygbstudio.jbrave.core.domain.BraveAPIConstant
urlParam, value
-
Field Details
-
URL_PARAM
- See Also:
-
-
Method Details
-
toSearchOption
SearchOptionCarrier<String> toSearchOption()Converts this region locale identifier to aSearchOptionCarrierthat can be used to build a URL parameter.- Specified by:
toSearchOptionin interfaceProvidedOption- Returns:
- a
SearchOptionCarrierrepresenting this identifier
-
urlParam
@NotNull static @NotNull String urlParam(@NotNull @NotNull RegionLocaleIdentifier regionLocaleIdentifier) Generates the URL parameter for this language identifier.The URL parameter has the format
"ui_lang=<value>", where"<value>"is the value of this identifier.- Parameters:
regionLocaleIdentifier- the identifier to generate the URL parameter for- Returns:
- the URL parameter for the given identifier
-