public abstract class BitSet extends Object implements Bits, Accountable
Bits.MatchAllBits, Bits.MatchNoBits
EMPTY_ARRAY
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, wait
getChildResources, ramBytesUsed
public static BitSet of(DocIdSetIterator it, int maxDoc) throws IOException
BitSet
from the content of the provided DocIdSetIterator
.
NOTE: this will fully consume the DocIdSetIterator
.IOException
public 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
IOException
Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.