Package org.elasticsearch.common.util
Class BitArray
java.lang.Object
org.elasticsearch.common.util.BitArray
- All Implemented Interfaces:
Closeable,AutoCloseable,org.elasticsearch.core.Releasable
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongvoidclear(long index)Clear theindexth bit.voidclose()booleanget(long index)Is theindexth bit set?longnextSetBit(long index)voidthis = this OR othervoidset(long index)Set theindexth bit.
-
Constructor Details
-
BitArray
Create the BitArray.- Parameters:
initialSize- the initial size of underlying storage expressed in bits.
-
-
Method Details
-
set
public void set(long index)Set theindexth bit. -
or
this = this OR other -
nextSetBit
public long nextSetBit(long index) -
cardinality
public long cardinality() -
clear
public void clear(long index)Clear theindexth bit. -
get
public boolean get(long index)Is theindexth bit set? -
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceorg.elasticsearch.core.Releasable
-