Package org.apache.lucene.util
Class FixedBits
java.lang.Object
org.apache.lucene.util.FixedBits
- All Implemented Interfaces:
Bits
Immutable twin of FixedBitSet.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.lucene.util.Bits
Bits.MatchAllBits, Bits.MatchNoBits
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) final long[]
(package private) final int
Fields inherited from interface org.apache.lucene.util.Bits
EMPTY_ARRAY
-
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
bits
final long[] bits -
length
final int length
-
-
Constructor Details
-
FixedBits
FixedBits(long[] bits, int length)
-
-
Method Details
-
get
public boolean get(int index) Description copied from interface:Bits
Returns the value of the bit with the specifiedindex
.- Specified by:
get
in 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:
true
if the bit is set,false
otherwise.
-
length
public int length()Description copied from interface:Bits
Returns the number of bits in this set
-