Enum Class BraveSearchOperator

java.lang.Object
java.lang.Enum<BraveSearchOperator>
net.ygbstudio.jbrave.core.model.BraveSearchOperator
All Implemented Interfaces:
Serializable, Comparable<BraveSearchOperator>, Constable

public enum BraveSearchOperator extends Enum<BraveSearchOperator>
Enumeration of the search operators supported by the Brave Search API.

Each constant carries the literal prefix appended to a value when an operator string is built via SearchOperatorBuilder (for example filetype:html or site:example.com). isLogicalOperator() identifies the logical combinators AND, OR, and NOT.

  • Enum Constant Details

  • Method Details

    • values

      public static BraveSearchOperator[] 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 BraveSearchOperator 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
    • isLogicalOperator

      @Contract(pure=true) public boolean isLogicalOperator()
      Returns true if the operator is a logical operator (AND, OR, NOT).
      Returns:
      true if the operator is a logical operator
    • toString

      public String toString()
      Overrides:
      toString in class Enum<BraveSearchOperator>