Interface CountryIdentifier
- All Superinterfaces:
BraveAPIConstant,ProvidedOption,SearchOption
- All Known Implementing Classes:
Country
An interface representing a country identifier.
This interface is implemented by enums that represent countries. The CountryIdentifier
interface extends ProvidedOption, providing methods for URL parameter generation.
- 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 country identifier to aSearchOptionCarrierthat can be used to build a URL parameter.static @NotNull StringurlParam(@NotNull CountryIdentifier countryIdentifier) Generates the URL parameter for this country 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 country identifier to aSearchOptionCarrierthat can be used to build a URL parameter.- Specified by:
toSearchOptionin interfaceProvidedOption- Returns:
- a
SearchOptionCarrierrepresenting this country identifier
-
urlParam
Generates the URL parameter for this country identifier.The URL parameter has the format
"country=<value>", where"<value>"is the value of this identifier.- Parameters:
countryIdentifier- the identifier to generate the URL parameter for- Returns:
- the URL parameter for the given identifier
-