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 intThe field for thesuffixrecord component.private final KnnVectorsWriterThe field for thewriterrecord component. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateWriterAndSuffix(KnnVectorsWriter writer, int suffix) Creates an instance of aWriterAndSuffixrecord class. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intsuffix()Returns the value of thesuffixrecord component.final StringtoString()Returns a string representation of this record class.writer()Returns the value of thewriterrecord component.
-
Field Details
-
writer
The field for thewriterrecord component. -
suffix
private final int suffixThe field for thesuffixrecord component.
-
-
Constructor Details
-
WriterAndSuffix
Creates an instance of aWriterAndSuffixrecord class.- Parameters:
writer- the value for thewriterrecord componentsuffix- the value for thesuffixrecord component
-
-
Method Details
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein 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 thewriterrecord component.- Returns:
- the value of the
writerrecord component
-
suffix
public int suffix()Returns the value of thesuffixrecord component.- Returns:
- the value of the
suffixrecord component
-