Record Class HighlightOptions.EnumOption
java.lang.Object
java.lang.Record
org.elasticsearch.xpack.esql.plan.logical.HighlightOptions.EnumOption
- Enclosing class:
HighlightOptions
public static record HighlightOptions.EnumOption(String name, List<String> allowed, boolean caseInsensitive)
extends Record
A string-valued enum option together with its allowed values and case-sensitivity. Shared by
Highlight.postAnalysisVerification(org.elasticsearch.xpack.esql.common.Failures) and HighlightOptions.from(org.elasticsearch.xpack.esql.core.expression.MapExpression, org.elasticsearch.xpack.esql.core.expression.FoldContext) so the two paths can never disagree on the allowed
set or whether matching is case-insensitive.-
Constructor Summary
ConstructorsConstructorDescriptionEnumOption(String name, List<String> allowed, boolean caseInsensitive) Creates an instance of aEnumOptionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionallowed()Returns the value of theallowedrecord component.booleanReturns the value of thecaseInsensitiverecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanname()Returns the value of thenamerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
EnumOption
Creates an instance of aEnumOptionrecord class.- Parameters:
name- the value for thenamerecord componentallowed- the value for theallowedrecord componentcaseInsensitive- the value for thecaseInsensitiverecord component
-
-
Method Details
-
normalize
-
isValid
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
allowed
Returns the value of theallowedrecord component.- Returns:
- the value of the
allowedrecord component
-
caseInsensitive
public boolean caseInsensitive()Returns the value of thecaseInsensitiverecord component.- Returns:
- the value of the
caseInsensitiverecord component
-