Enum Class Country

java.lang.Object
java.lang.Enum<Country>
net.ygbstudio.jbrave.api.options.Country
All Implemented Interfaces:
Serializable, Comparable<Country>, Constable, BraveAPIConstant, CountryIdentifier, ProvidedOption, SearchOption

public enum Country extends Enum<Country> implements CountryIdentifier
Enumeration representing a country supported by the Brave Search API.

This enumeration implements the CountryIdentifier interface, providing methods for URL parameter generation.

See Also:
  • Enum Constant Details

    • ARGENTINA

      public static final Country ARGENTINA
      Argentina.
    • AUSTRALIA

      public static final Country AUSTRALIA
      Australia.
    • AUSTRIA

      public static final Country AUSTRIA
      Austria.
    • BELGIUM

      public static final Country BELGIUM
      Belgium.
    • BRAZIL

      public static final Country BRAZIL
      Brazil.
    • CANADA

      public static final Country CANADA
      Canada.
    • CHILE

      public static final Country CHILE
      Chile.
    • DENMARK

      public static final Country DENMARK
      Denmark.
    • FINLAND

      public static final Country FINLAND
      Finland.
    • FRANCE

      public static final Country FRANCE
      France.
    • GERMANY

      public static final Country GERMANY
      Germany.
    • GREECE

      public static final Country GREECE
      Greece.
    • HONG_KONG

      public static final Country HONG_KONG
      Hong Kong.
    • INDIA

      public static final Country INDIA
      India.
    • INDONESIA

      public static final Country INDONESIA
      Indonesia.
    • ITALY

      public static final Country ITALY
      Italy.
    • JAPAN

      public static final Country JAPAN
      Japan.
    • KOREA

      public static final Country KOREA
      Korea.
    • MALAYSIA

      public static final Country MALAYSIA
      Malaysia.
    • MEXICO

      public static final Country MEXICO
      Mexico.
    • NETHERLANDS

      public static final Country NETHERLANDS
      Netherlands.
    • NEW_ZEALAND

      public static final Country NEW_ZEALAND
      New Zealand.
    • NORWAY

      public static final Country NORWAY
      Norway.
    • CHINA

      public static final Country CHINA
      China.
    • POLAND

      public static final Country POLAND
      Poland.
    • PORTUGAL

      public static final Country PORTUGAL
      Portugal.
    • PHILIPPINES

      public static final Country PHILIPPINES
      Philippines.
    • RUSSIA

      public static final Country RUSSIA
      Russia.
    • SAUDI_ARABIA

      public static final Country SAUDI_ARABIA
      Saudi Arabia.
    • SOUTH_AFRICA

      public static final Country SOUTH_AFRICA
      South Africa.
    • SPAIN

      public static final Country SPAIN
      Spain.
    • SWEDEN

      public static final Country SWEDEN
      Sweden.
    • SWITZERLAND

      public static final Country SWITZERLAND
      Switzerland.
    • TAIWAN

      public static final Country TAIWAN
      Taiwan.
    • TURKEY

      public static final Country TURKEY
      Turkey.
    • UNITED_KINGDOM

      public static final Country UNITED_KINGDOM
      United Kingdom.
    • UNITED_STATES

      public static final Country UNITED_STATES
      United States.
  • Method Details

    • values

      public static Country[] 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

      public static Country valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • value

      public String value()
      Description copied from interface: BraveAPIConstant
      Returns the value of the constant. Must be implemented by the enum constants.
      Specified by:
      value in interface BraveAPIConstant
      Returns:
      the value of the constant
    • urlParam

      @NotNull public @NotNull String urlParam()
      Description copied from interface: BraveAPIConstant
      Returns 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 parameterValue may 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:
      urlParam in interface BraveAPIConstant
      Returns:
      the URL parameter associated with this constant
      See Also:
    • toSearchOption

      @Contract(" -> new") @NotNull public @NotNull @Unmodifiable SearchOptionCarrier<String> toSearchOption()
      Description copied from interface: CountryIdentifier
      Converts this country identifier to a SearchOptionCarrier for use in a search request.
      Specified by:
      toSearchOption in interface CountryIdentifier
      Specified by:
      toSearchOption in interface ProvidedOption
      Returns:
      the SearchOptionCarrier representing this country