Class BitSet


  • public class BitSet
    extends Object
    • Constructor Detail

      • BitSet

        public BitSet​(int byteSize)
    • 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()
        Serializing MemorySegment to bytes, note that only heap memory is currently supported.
      • clear

        public void clear()
        Clear the bit set.