Interface LanguageIdentifier
- All Superinterfaces:
BraveAPIConstant,ProvidedOption,SearchOption
- All Known Implementing Classes:
SearchLanguage
An interface representing a language identifier.
Each language identifier has a BraveAPIConstant.value() method that is used to get the parameter value
for the API requests.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe URL parameter name for the search language option ("search_lang").Fields 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 language identifier to aSearchOptionCarrierfor use in a search request.static @NotNull StringurlParam(@NotNull LanguageIdentifier languageIdentifier) Generates the URL parameter for this language identifier.Methods inherited from interface net.ygbstudio.jbrave.core.domain.BraveAPIConstant
urlParam, value
-
Field Details
-
URL_PARAM
The URL parameter name for the search language option ("search_lang").- See Also:
-
-
Method Details
-
toSearchOption
SearchOptionCarrier<String> toSearchOption()Converts this language identifier to aSearchOptionCarrierfor use in a search request.- Specified by:
toSearchOptionin interfaceProvidedOption- Returns:
- the
SearchOptionCarrierrepresenting this language
-
urlParam
Generates the URL parameter for this language identifier.The URL parameter has the format
"search_lang=<value>", where"<value>"is the value of this identifier.- Parameters:
languageIdentifier- the identifier to generate the URL parameter for- Returns:
- the URL parameter for the given identifier
-