Module org.apache.lucene.codecs
Record Class SimpleTextLiveDocsFormat.SimpleTextBits
java.lang.Object
java.lang.Record
org.apache.lucene.codecs.simpletext.SimpleTextLiveDocsFormat.SimpleTextBits
- All Implemented Interfaces:
Bits
- Enclosing class:
SimpleTextLiveDocsFormat
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.lucene.util.Bits
Bits.MatchAllBits, Bits.MatchNoBits -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final BitSetThe field for thebitsrecord component.private final intThe field for thesizerecord component.Fields inherited from interface org.apache.lucene.util.Bits
EMPTY_ARRAY -
Constructor Summary
ConstructorsConstructorDescriptionSimpleTextBits(BitSet bits, int size) Creates an instance of aSimpleTextBitsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbits()Returns the value of thebitsrecord component.final booleanIndicates whether some other object is "equal to" this one.booleanget(int index) Returns the value of the bit with the specifiedindex.final inthashCode()Returns a hash code value for this object.intlength()Returns the number of bits in this setintsize()Returns the value of thesizerecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
bits
The field for thebitsrecord component. -
size
private final int sizeThe field for thesizerecord component.
-
-
Constructor Details
-
SimpleTextBits
SimpleTextBits(BitSet bits, int size) Creates an instance of aSimpleTextBitsrecord class.- Parameters:
bits- the value for thebitsrecord componentsize- the value for thesizerecord component
-
-
Method Details
-
get
public boolean get(int index) Description copied from interface:BitsReturns the value of the bit with the specifiedindex.- Specified by:
getin interfaceBits- Parameters:
index- index, should be non-negative and <Bits.length(). The result of passing negative or out of bounds values is undefined by this interface, just don't do it!- Returns:
trueif the bit is set,falseotherwise.
-
length
public int length()Description copied from interface:BitsReturns the number of bits in this set -
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 '=='. -
bits
Returns the value of thebitsrecord component.- Returns:
- the value of the
bitsrecord component
-
size
public int size()Returns the value of thesizerecord component.- Returns:
- the value of the
sizerecord component
-