Package org.apache.lucene.util
Interface Bits
- All Known Subinterfaces:
MutableBits
- All Known Implementing Classes:
Bits.MatchAllBits
,Bits.MatchNoBits
,DocIdBitSet
,DocValuesProducer.SortedDocsWithField
,DocValuesProducer.SortedSetDocsWithField
,FixedBitSet
,OpenBitSet
,OpenBitSetDISI
public interface Bits
Interface for Bitset-like structures.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic class
Bits impl of the specified length with all bits set.static class
Bits impl of the specified length with no bits set. -
Field Summary
Fields -
Method Summary
-
Field Details
-
EMPTY_ARRAY
-
-
Method Details
-
get
boolean get(int index) Returns the value of the bit with the specifiedindex
.- Parameters:
index
- index, should be non-negative and <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
int length()Returns the number of bits in this set
-