Package org.apache.lucene.util.packed
Record Class PackedInts.FormatAndBits
java.lang.Object
java.lang.Record
org.apache.lucene.util.packed.PackedInts.FormatAndBits
- Enclosing class:
PackedInts
public static record PackedInts.FormatAndBits(PackedInts.Format format, int bitsPerValue)
extends Record
Simple class that holds a format and a number of bits per value.
-
Constructor Summary
ConstructorsConstructorDescriptionFormatAndBits(PackedInts.Format format, int bitsPerValue) Creates an instance of aFormatAndBitsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thebitsPerValuerecord component.final booleanIndicates whether some other object is "equal to" this one.format()Returns the value of theformatrecord component.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
FormatAndBits
Creates an instance of aFormatAndBitsrecord class.- Parameters:
format- the value for theformatrecord componentbitsPerValue- the value for thebitsPerValuerecord component
-
-
Method Details
-
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 '=='. -
format
Returns the value of theformatrecord component.- Returns:
- the value of the
formatrecord component
-
bitsPerValue
public int bitsPerValue()Returns the value of thebitsPerValuerecord component.- Returns:
- the value of the
bitsPerValuerecord component
-