Interface CountryIdentifier

All Superinterfaces:
BraveAPIConstant, ProvidedOption, SearchOption
All Known Implementing Classes:
Country

public interface CountryIdentifier extends ProvidedOption
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 Details

  • Method Details

    • toSearchOption

      SearchOptionCarrier<String> toSearchOption()
      Converts this country identifier to a SearchOptionCarrier that can be used to build a URL parameter.
      Specified by:
      toSearchOption in interface ProvidedOption
      Returns:
      a SearchOptionCarrier representing this country identifier
    • urlParam

      @NotNull static @NotNull String urlParam(@NotNull @NotNull CountryIdentifier countryIdentifier)
      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