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
-
Method Summary
Modifier and TypeMethodDescriptionlong
void
clear(long index)
Clear theindex
th bit.void
close()
boolean
get(long index)
Is theindex
th bit set?long
nextSetBit(long index)
void
this = this OR othervoid
set(long index)
Set theindex
th 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 theindex
th bit. -
or
this = this OR other -
nextSetBit
public long nextSetBit(long index) -
cardinality
public long cardinality() -
clear
public void clear(long index)Clear theindex
th bit. -
get
public boolean get(long index)Is theindex
th bit set? -
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfaceorg.elasticsearch.core.Releasable
-