Package net.ygbstudio.jbrave.api.options
Enum Class MarketLocale
- All Implemented Interfaces:
Serializable,Comparable<MarketLocale>,Constable,BraveAPIConstant,RegionLocaleIdentifier,ProvidedOption,SearchOption
Enumeration representing a market locale supported by the Brave Search API.
This enumeration implements the RegionLocaleIdentifier interface, providing methods
for URL parameter generation.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionArgentina.Australia.Austria.Belgium (Dutch).Belgium (French).Brazil.Canada (English).Canada (French).Chile.China.Denmark.Finland.France.Germany.Greece.Hong Kong.India.Indonesia.Italy.Japan.Korea.Malaysia.Mexico.Netherlands.New Zealand.Norway.Philippines.Poland.Russia.South Africa.Spain.Sweden.Switzerland (French).Switzerland (German).Taiwan.Turkey.United Kingdom.United States (English).United States (Spanish). -
Field Summary
Fields inherited from interface net.ygbstudio.jbrave.core.domain.BraveAPIConstant
SEARCH_API_BASEFields inherited from interface net.ygbstudio.jbrave.core.domain.ProvidedOption
UNITSFields inherited from interface net.ygbstudio.jbrave.core.domain.provided.RegionLocaleIdentifier
URL_PARAM -
Method Summary
Modifier and TypeMethodDescription@NotNull @Unmodifiable SearchOptionCarrier<String> Converts this region-locale identifier to aSearchOptionCarrierfor use in a search request.@NotNull StringurlParam()Returns the URL parameter associated with this constant.value()Returns the value of the constant.static MarketLocaleReturns the enum constant of this class with the specified name.static MarketLocale[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
ARGENTINA
Argentina. -
AUSTRALIA
Australia. -
AUSTRIA
Austria. -
BELGIUM_DUTCH
Belgium (Dutch). -
BELGIUM_FRENCH
Belgium (French). -
BRAZIL
Brazil. -
CANADA_ENGLISH
Canada (English). -
CANADA_FRENCH
Canada (French). -
CHILE
Chile. -
DENMARK
Denmark. -
FINLAND
Finland. -
FRANCE
France. -
GERMANY
Germany. -
GREECE
Greece. -
HONG_KONG
Hong Kong. -
INDIA
India. -
INDONESIA
Indonesia. -
ITALY
Italy. -
JAPAN
Japan. -
KOREA
Korea. -
MALAYSIA
Malaysia. -
MEXICO
Mexico. -
NETHERLANDS
Netherlands. -
NEW_ZEALAND
New Zealand. -
NORWAY
Norway. -
CHINA
China. -
POLAND
Poland. -
PHILIPPINES
Philippines. -
RUSSIA
Russia. -
SOUTH_AFRICA
South Africa. -
SPAIN
Spain. -
SWEDEN
Sweden. -
SWITZERLAND_FRENCH
Switzerland (French). -
SWITZERLAND_GERMAN
Switzerland (German). -
TAIWAN
Taiwan. -
TURKEY
Turkey. -
UNITED_KINGDOM
United Kingdom. -
UNITED_STATES_ENGLISH
United States (English). -
UNITED_STATES_SPANISH
United States (Spanish).
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
value
Description copied from interface:BraveAPIConstantReturns the value of the constant. Must be implemented by the enum constants.- Specified by:
valuein interfaceBraveAPIConstant- Returns:
- the value of the constant
-
urlParam
Description copied from interface:BraveAPIConstantReturns the URL parameter associated with this constant. It can be implemented by default at the interface level with the value of the parameter.This method is used to generate the URL parameter for the API requests and represents a unit of
option/parameterName/parameterConstant + "=" + parameterValue.A
parameterValuemay be provided by the API or require that the client provides it. By default, all options/parameters names are provided by the API.- Specified by:
urlParamin interfaceBraveAPIConstant- Returns:
- the URL parameter associated with this constant
- See Also:
-
toSearchOption
@Contract(" -> new") @NotNull public @NotNull @Unmodifiable SearchOptionCarrier<String> toSearchOption()Description copied from interface:RegionLocaleIdentifierConverts this region-locale identifier to aSearchOptionCarrierfor use in a search request.- Specified by:
toSearchOptionin interfaceProvidedOption- Specified by:
toSearchOptionin interfaceRegionLocaleIdentifier- Returns:
- the
SearchOptionCarrierrepresenting this region-locale
-