public abstract class BitSet extends Object implements Bits, Accountable
Bits.MatchAllBits, Bits.MatchNoBitsEMPTY_ARRAYNULL_ACCOUNTABLE| Constructor and Description |
|---|
BitSet() |
| Modifier and Type | Method and Description |
|---|---|
int |
approximateCardinality()
Return an approximation of the cardinality of this set.
|
abstract int |
cardinality()
Return the number of bits that are set.
|
protected void |
checkUnpositioned(DocIdSetIterator iter)
Assert that the current doc is -1.
|
abstract void |
clear(int i)
Clear the bit at
i. |
abstract void |
clear(int startIndex,
int endIndex)
Clears a range of bits.
|
abstract int |
nextSetBit(int index)
Returns the index of the first set bit starting at the index specified.
|
static BitSet |
of(DocIdSetIterator it,
int maxDoc)
Build a
BitSet from the content of the provided DocIdSetIterator. |
void |
or(DocIdSetIterator iter)
Does in-place OR of the bits provided by the iterator.
|
abstract int |
prevSetBit(int index)
Returns the index of the last set bit before or on the index specified.
|
abstract void |
set(int i)
Set the bit at
i. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetChildResources, ramBytesUsedpublic static BitSet of(DocIdSetIterator it, int maxDoc) throws IOException
BitSet from the content of the provided DocIdSetIterator.
NOTE: this will fully consume the DocIdSetIterator.IOExceptionpublic abstract void set(int i)
i.public abstract void clear(int i)
i.public abstract void clear(int startIndex,
int endIndex)
startIndex - lower indexendIndex - one-past the last bit to clearpublic abstract int cardinality()
public int approximateCardinality()
cardinality().public abstract int prevSetBit(int index)
public abstract int nextSetBit(int index)
DocIdSetIterator.NO_MORE_DOCS is returned if there are no more set bits.protected final void checkUnpositioned(DocIdSetIterator iter)
public void or(DocIdSetIterator iter) throws IOException
IOExceptionCopyright © 2000-2021 Apache Software Foundation. All Rights Reserved.