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 int
bitSize()
Number of bitsvoid
clear()
Clear the bit set.boolean
get(int index)
Returns true if the bit is set in the specified index.void
set(int index)
Sets the bit at specified index.void
setMemorySegment(org.apache.flink.core.memory.MemorySegment memorySegment, int offset)
byte[]
toBytes()
SerializingMemorySegment
to bytes, note that only heap memory is currently supported.String
toString()
-
-
-
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()
SerializingMemorySegment
to bytes, note that only heap memory is currently supported.
-
clear
public void clear()
Clear the bit set.
-
-