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
    • AUSTRALIA

      public static final Country AUSTRALIA
    • AUSTRIA

      public static final Country AUSTRIA
    • BELGIUM

      public static final Country BELGIUM
    • BRAZIL

      public static final Country BRAZIL
    • CANADA

      public static final Country CANADA
    • CHILE

      public static final Country CHILE
    • DENMARK

      public static final Country DENMARK
    • FINLAND

      public static final Country FINLAND
    • FRANCE

      public static final Country FRANCE
    • GERMANY

      public static final Country GERMANY
    • GREECE

      public static final Country GREECE
    • HONG_KONG

      public static final Country HONG_KONG
    • INDIA

      public static final Country INDIA
    • INDONESIA

      public static final Country INDONESIA
    • ITALY

      public static final Country ITALY
    • JAPAN

      public static final Country JAPAN
    • KOREA

      public static final Country KOREA
    • MALAYSIA

      public static final Country MALAYSIA
    • MEXICO

      public static final Country MEXICO
    • NETHERLANDS

      public static final Country NETHERLANDS
    • NEW_ZEALAND

      public static final Country NEW_ZEALAND
    • NORWAY

      public static final Country NORWAY
    • CHINA

      public static final Country CHINA
    • POLAND

      public static final Country POLAND
    • PORTUGAL

      public static final Country PORTUGAL
    • PHILIPPINES

      public static final Country PHILIPPINES
    • RUSSIA

      public static final Country RUSSIA
    • SAUDI_ARABIA

      public static final Country SAUDI_ARABIA
    • SOUTH_AFRICA

      public static final Country SOUTH_AFRICA
    • SPAIN

      public static final Country SPAIN
    • SWEDEN

      public static final Country SWEDEN
    • SWITZERLAND

      public static final Country SWITZERLAND
    • TAIWAN

      public static final Country TAIWAN
    • TURKEY

      public static final Country TURKEY
    • UNITED_KINGDOM

      public static final Country UNITED_KINGDOM
    • UNITED_STATES

      public static final Country 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 that can be used to build a URL parameter.
      Specified by:
      toSearchOption in interface CountryIdentifier
      Specified by:
      toSearchOption in interface ProvidedOption
      Returns:
      a SearchOptionCarrier representing this country identifier