Module org.apache.lucene.core
Record Class PerFieldKnnVectorsFormat.WriterAndSuffix
java.lang.Object
java.lang.Record
org.apache.lucene.codecs.perfield.PerFieldKnnVectorsFormat.WriterAndSuffix
- All Implemented Interfaces:
Closeable
,AutoCloseable
- Enclosing class:
PerFieldKnnVectorsFormat
private static record PerFieldKnnVectorsFormat.WriterAndSuffix(KnnVectorsWriter writer, int suffix)
extends Record
implements Closeable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final int
The field for thesuffix
record component.private final KnnVectorsWriter
The field for thewriter
record component. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
WriterAndSuffix
(KnnVectorsWriter writer, int suffix) Creates an instance of aWriterAndSuffix
record class. -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.int
suffix()
Returns the value of thesuffix
record component.final String
toString()
Returns a string representation of this record class.writer()
Returns the value of thewriter
record component.
-
Field Details
-
writer
The field for thewriter
record component. -
suffix
private final int suffixThe field for thesuffix
record component.
-
-
Constructor Details
-
WriterAndSuffix
Creates an instance of aWriterAndSuffix
record class.- Parameters:
writer
- the value for thewriter
record componentsuffix
- the value for thesuffix
record component
-
-
Method Details
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-
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 '=='. -
writer
Returns the value of thewriter
record component.- Returns:
- the value of the
writer
record component
-
suffix
public int suffix()Returns the value of thesuffix
record component.- Returns:
- the value of the
suffix
record component
-