Package org.apache.lucene.util
Interface Bits
-
- All Known Implementing Classes:
Bits.MatchAllBits,Bits.MatchNoBits,BitSet,FixedBitSet,MultiBits,SparseFixedBitSet
public interface BitsInterface for Bitset-like structures.- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classBits.MatchAllBitsBits impl of the specified length with all bits set.static classBits.MatchNoBitsBits impl of the specified length with no bits set.
-
Field Summary
Fields Modifier and Type Field Description static Bits[]EMPTY_ARRAY
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanget(int index)Returns the value of the bit with the specifiedindex.intlength()Returns the number of bits in this set
-
-
-
Field Detail
-
EMPTY_ARRAY
static final Bits[] EMPTY_ARRAY
-
-
Method Detail
-
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:
trueif the bit is set,falseotherwise.
-
length
int length()
Returns the number of bits in this set
-
-