java.lang.Object
org.apache.lucene.util.BitSet
org.elasticsearch.lucene.util.MatchAllBitSet
- All Implemented Interfaces:
org.apache.lucene.util.Accountable
,org.apache.lucene.util.Bits
public final class MatchAllBitSet
extends org.apache.lucene.util.BitSet
An optimized implementation of
BitSet
that matches all documents to reduce memory usage.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.lucene.util.Bits
org.apache.lucene.util.Bits.MatchAllBits, org.apache.lucene.util.Bits.MatchNoBits
-
Field Summary
Fields inherited from interface org.apache.lucene.util.Accountable
NULL_ACCOUNTABLE
Fields inherited from interface org.apache.lucene.util.Bits
EMPTY_ARRAY
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
int
void
clear
(int i) void
clear
(int startIndex, int endIndex) boolean
get
(int index) boolean
getAndSet
(int i) int
length()
int
nextSetBit
(int index) void
or
(org.apache.lucene.search.DocIdSetIterator iter) int
prevSetBit
(int index) long
void
set
(int i) Methods inherited from class org.apache.lucene.util.BitSet
checkUnpositioned, of
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.lucene.util.Accountable
getChildResources
-
Constructor Details
-
MatchAllBitSet
public MatchAllBitSet(int numBits)
-
-
Method Details
-
set
public void set(int i) - Specified by:
set
in classorg.apache.lucene.util.BitSet
-
getAndSet
public boolean getAndSet(int i) - Specified by:
getAndSet
in classorg.apache.lucene.util.BitSet
-
clear
public void clear(int i) - Specified by:
clear
in classorg.apache.lucene.util.BitSet
-
clear
public void clear(int startIndex, int endIndex) - Specified by:
clear
in classorg.apache.lucene.util.BitSet
-
cardinality
public int cardinality()- Specified by:
cardinality
in classorg.apache.lucene.util.BitSet
-
approximateCardinality
public int approximateCardinality()- Specified by:
approximateCardinality
in classorg.apache.lucene.util.BitSet
-
prevSetBit
public int prevSetBit(int index) - Specified by:
prevSetBit
in classorg.apache.lucene.util.BitSet
-
nextSetBit
public int nextSetBit(int index) - Specified by:
nextSetBit
in classorg.apache.lucene.util.BitSet
-
ramBytesUsed
public long ramBytesUsed() -
get
public boolean get(int index) -
length
public int length() -
or
- Overrides:
or
in classorg.apache.lucene.util.BitSet
- Throws:
IOException
-