Module org.apache.lucene.join
Package org.apache.lucene.search.join
Record Class DiversifyingNearestChildrenKnnCollector.ParentChildScore
java.lang.Object
java.lang.Record
org.apache.lucene.search.join.DiversifyingNearestChildrenKnnCollector.ParentChildScore
- All Implemented Interfaces:
Comparable<DiversifyingNearestChildrenKnnCollector.ParentChildScore>
- Enclosing class:
DiversifyingNearestChildrenKnnCollector
private static record DiversifyingNearestChildrenKnnCollector.ParentChildScore(int child, int parent, float score)
extends Record
implements Comparable<DiversifyingNearestChildrenKnnCollector.ParentChildScore>
Keeps track of child node, parent node, and the stored score.
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
ParentChildScore
(int child, int parent, float score) Creates an instance of aParentChildScore
record class. -
Method Summary
Modifier and TypeMethodDescriptionint
child()
Returns the value of thechild
record component.int
final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.int
parent()
Returns the value of theparent
record component.float
score()
Returns the value of thescore
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
child
private final int childThe field for thechild
record component. -
parent
private final int parentThe field for theparent
record component. -
score
private final float scoreThe field for thescore
record component.
-
-
Constructor Details
-
ParentChildScore
private ParentChildScore(int child, int parent, float score) Creates an instance of aParentChildScore
record class.- Parameters:
child
- the value for thechild
record componentparent
- the value for theparent
record componentscore
- the value for thescore
record component
-
-
Method Details
-
compareTo
- Specified by:
compareTo
in interfaceComparable<DiversifyingNearestChildrenKnnCollector.ParentChildScore>
-
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. All components in this record class are compared with '=='. -
child
public int child()Returns the value of thechild
record component.- Returns:
- the value of the
child
record component
-
parent
public int parent()Returns the value of theparent
record component.- Returns:
- the value of the
parent
record component
-
score
public float score()Returns the value of thescore
record component.- Returns:
- the value of the
score
record component
-