Package org.apache.lucene.index
Class BitsSlice
java.lang.Object
org.apache.lucene.index.BitsSlice
- All Implemented Interfaces:
Bits
Exposes a slice of an existing Bits as a new Bits.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.lucene.util.Bits
Bits.MatchAllBits, Bits.MatchNoBits
-
Field Summary
FieldsFields inherited from interface org.apache.lucene.util.Bits
EMPTY_ARRAY
-
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
parent
-
start
private final int start -
length
private final int length
-
-
Constructor Details
-
BitsSlice
-
-
Method Details
-
get
public boolean get(int doc) Description copied from interface:Bits
Returns the value of the bit with the specifiedindex
.- Specified by:
get
in interfaceBits
- Parameters:
doc
- 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
-