Module org.apache.lucene.suggest
Record Class NRTSuggesterBuilder.Entry
java.lang.Object
java.lang.Record
org.apache.lucene.search.suggest.document.NRTSuggesterBuilder.Entry
- All Implemented Interfaces:
Comparable<NRTSuggesterBuilder.Entry>
- Enclosing class:
NRTSuggesterBuilder
private static record NRTSuggesterBuilder.Entry(BytesRef payload, long weight)
extends Record
implements Comparable<NRTSuggesterBuilder.Entry>
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.payload()
Returns the value of thepayload
record component.final String
toString()
Returns a string representation of this record class.long
weight()
Returns the value of theweight
record component.
-
Field Details
-
payload
The field for thepayload
record component. -
weight
private final long weightThe field for theweight
record component.
-
-
Constructor Details
-
Entry
Creates an instance of aEntry
record class.- Parameters:
payload
- the value for thepayload
record componentweight
- the value for theweight
record component
-
-
Method Details
-
compareTo
- Specified by:
compareTo
in interfaceComparable<NRTSuggesterBuilder.Entry>
-
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 '=='. -
payload
Returns the value of thepayload
record component.- Returns:
- the value of the
payload
record component
-
weight
public long weight()Returns the value of theweight
record component.- Returns:
- the value of the
weight
record component
-