Package org.elasticsearch.index.query
Enum Class RegexpFlag
- All Implemented Interfaces:
Serializable
,Comparable<RegexpFlag>
,Constable
Regular expression syntax flags. Each flag represents optional syntax support in the regular expression:
INTERSECTION
- Support for intersection notation:<expression> & <expression>
COMPLEMENT
- Support for complement notation:<expression> & <expression>
EMPTY
- Support for the empty language symbol:#
ANYSTRING
- Support for the any string symbol:@
INTERVAL
- Support for numerical interval notation:<n-m>
NONE
- Disable support for all syntax optionsALL
- Enables support for all syntax options
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionEnables all available option flagsEnables any string expression:@
Enables complement expression of the form:~<expression>
Enables empty language expression:#
Enables intersection of the form:<expression> & <expression>
Enables numerical interval expression:<n-m>
Disables all available option flags -
Method Summary
Modifier and TypeMethodDescriptionstatic int
resolveValue(String flags)
Resolves the combined OR'ed value for the given list of regular expression flags.int
value()
static RegexpFlag
Returns the enum constant of this class with the specified name.static RegexpFlag[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
INTERSECTION
Enables intersection of the form:<expression> & <expression>
-
COMPLEMENT
Enables complement expression of the form:~<expression>
-
EMPTY
Enables empty language expression:#
-
ANYSTRING
Enables any string expression:@
-
INTERVAL
Enables numerical interval expression:<n-m>
-
NONE
Disables all available option flags -
ALL
Enables all available option flags
-
-
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
-
value
public int value() -
resolveValue
Resolves the combined OR'ed value for the given list of regular expression flags. The given flags must follow the following syntax:flag_name
(|flag_name
)*Where
flag_name
is one of the following:- INTERSECTION
- COMPLEMENT
- EMPTY
- ANYSTRING
- INTERVAL
- NONE
- ALL
Example:
INTERSECTION|COMPLEMENT|EMPTY
- Parameters:
flags
- A string representing a list of regular expression flags- Returns:
- The combined OR'ed value for all the flags
-