Package net.ygbstudio.jbrave.core.model
Enum Class BraveSearchOperator
- All Implemented Interfaces:
Serializable,Comparable<BraveSearchOperator>,Constable
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.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionLogical AND operator.File extension search operator.Filetype search operator.Body content search operator.Page content search operator.Title content search operator.Language search operator.Location search operator.Exclusion operator (-).Logical NOT operator.Logical OR operator.Inclusion operator (+).Exact match operator (wraps a value in double quotes).Site restriction operator. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns true if the operator is a logical operator (AND, OR, NOT).toString()static BraveSearchOperatorReturns the enum constant of this class with the specified name.static BraveSearchOperator[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
EXT
File extension search operator. -
FILETYPE
Filetype search operator. -
INTITLE
Title content search operator. -
INBODY
Body content search operator. -
INPAGE
Page content search operator. -
LANG
Language search operator. -
LOC
Location search operator. -
SITE
Site restriction operator. -
PLUS
Inclusion operator (+). -
MINUS
Exclusion operator (-). -
QUOTE
Exact match operator (wraps a value in double quotes). -
AND
Logical AND operator. -
OR
Logical OR operator. -
NOT
Logical NOT operator.
-
-
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
-
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
- Overrides:
toStringin classEnum<BraveSearchOperator>
-