Class BitSet
java.lang.Object
org.apache.flink.runtime.operators.util.BitSet
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintbitSize()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.toString()
-
Constructor Details
-
BitSet
public BitSet(int byteSize)
-
-
Method Details
-
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. -
toString
-