Module org.apache.lucene.sandbox
Record Class FloatPointNearestNeighbor.Cell
java.lang.Object
java.lang.Record
org.apache.lucene.sandbox.document.FloatPointNearestNeighbor.Cell
- Record Components:
distanceSquared- The closest possible distance^2 of all points in this cell
- All Implemented Interfaces:
Comparable<FloatPointNearestNeighbor.Cell>
- Enclosing class:
FloatPointNearestNeighbor
static record FloatPointNearestNeighbor.Cell(PointValues.PointTree index, int readerIndex, byte[] minPacked, byte[] maxPacked, double distanceSquared)
extends Record
implements Comparable<FloatPointNearestNeighbor.Cell>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final doubleThe field for thedistanceSquaredrecord component.private final PointValues.PointTreeThe field for theindexrecord component.private final byte[]The field for themaxPackedrecord component.private final byte[]The field for theminPackedrecord component.private final intThe field for thereaderIndexrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionCell(PointValues.PointTree index, int readerIndex, byte[] minPacked, byte[] maxPacked, double distanceSquared) Creates an instance of aCellrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintdoubleReturns the value of thedistanceSquaredrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.index()Returns the value of theindexrecord component.byte[]Returns the value of themaxPackedrecord component.byte[]Returns the value of theminPackedrecord component.intReturns the value of thereaderIndexrecord component.toString()Returns a string representation of this record class.
-
Field Details
-
index
The field for theindexrecord component. -
readerIndex
private final int readerIndexThe field for thereaderIndexrecord component. -
minPacked
private final byte[] minPackedThe field for theminPackedrecord component. -
maxPacked
private final byte[] maxPackedThe field for themaxPackedrecord component. -
distanceSquared
private final double distanceSquaredThe field for thedistanceSquaredrecord component.
-
-
Constructor Details
-
Cell
Cell(PointValues.PointTree index, int readerIndex, byte[] minPacked, byte[] maxPacked, double distanceSquared) Creates an instance of aCellrecord class.- Parameters:
index- the value for theindexrecord componentreaderIndex- the value for thereaderIndexrecord componentminPacked- the value for theminPackedrecord componentmaxPacked- the value for themaxPackedrecord componentdistanceSquared- the value for thedistanceSquaredrecord component
-
-
Method Details
-
compareTo
- Specified by:
compareToin interfaceComparable<FloatPointNearestNeighbor.Cell>
-
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 '=='. -
index
Returns the value of theindexrecord component.- Returns:
- the value of the
indexrecord component
-
readerIndex
public int readerIndex()Returns the value of thereaderIndexrecord component.- Returns:
- the value of the
readerIndexrecord component
-
minPacked
public byte[] minPacked()Returns the value of theminPackedrecord component.- Returns:
- the value of the
minPackedrecord component
-
maxPacked
public byte[] maxPacked()Returns the value of themaxPackedrecord component.- Returns:
- the value of the
maxPackedrecord component
-
distanceSquared
public double distanceSquared()Returns the value of thedistanceSquaredrecord component.- Returns:
- the value of the
distanceSquaredrecord component
-