Module org.elasticsearch.server
Record Class ContextMapping.InternalQueryContext
java.lang.Object
java.lang.Record
org.elasticsearch.search.suggest.completion.context.ContextMapping.InternalQueryContext
- Enclosing class:
- ContextMapping<T extends ToXContent>
-
Constructor Summary
ConstructorDescriptionInternalQueryContext
(String context, int boost, boolean isPrefix) Creates an instance of aInternalQueryContext
record class. -
Method Summary
Modifier and TypeMethodDescriptionint
boost()
Returns the value of theboost
record component.context()
Returns the value of thecontext
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.boolean
isPrefix()
Returns the value of theisPrefix
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
InternalQueryContext
Creates an instance of aInternalQueryContext
record class.- Parameters:
context
- the value for thecontext
record componentboost
- the value for theboost
record componentisPrefix
- the value for theisPrefix
record component
-
-
Method Details
-
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 '=='. -
context
Returns the value of thecontext
record component.- Returns:
- the value of the
context
record component
-
boost
public int boost()Returns the value of theboost
record component.- Returns:
- the value of the
boost
record component
-
isPrefix
public boolean isPrefix()Returns the value of theisPrefix
record component.- Returns:
- the value of the
isPrefix
record component
-