Class BitSet
- java.lang.Object
-
- org.apache.flink.runtime.operators.util.BitSet
-
public class BitSet extends Object
-
-
Constructor Summary
Constructors Constructor Description BitSet(int byteSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intbitSize()Number of bitsvoidclear()Clear the bit set.booleanget(int index)Returns true if the bit is set in the specified index.voidset(int index)Sets the bit at specified index.voidsetMemorySegment(org.apache.flink.core.memory.MemorySegment memorySegment, int offset)byte[]toBytes()SerializingMemorySegmentto bytes, note that only heap memory is currently supported.StringtoString()
-
-
-
Method Detail
-
setMemorySegment
public void setMemorySegment(org.apache.flink.core.memory.MemorySegment memorySegment, int offset)
-
set
public void set(int index)
Sets the bit at specified index.- Parameters:
index- - position
-
get
public boolean get(int index)
Returns true if the bit is set in the specified index.- Parameters:
index- - position- Returns:
- - value at the bit position
-
bitSize
public int bitSize()
Number of bits
-
toBytes
public byte[] toBytes()
SerializingMemorySegmentto bytes, note that only heap memory is currently supported.
-
clear
public void clear()
Clear the bit set.
-
-