Interface RBitSet

    • Method Detail

      • length

        long length()
        Returns "logical size" = index of highest set bit plus one. Returns zero if there are no any set bit.
        Returns:
        "logical size" = index of highest set bit plus one
      • set

        void set​(long fromIndex,
                 long toIndex,
                 boolean value)
        Set all bits to value from fromIndex (inclusive) to toIndex (exclusive)
        Parameters:
        fromIndex - inclusive
        toIndex - exclusive
        value - true = 1, false = 0
      • clear

        void clear​(long fromIndex,
                   long toIndex)
        Set all bits to zero from fromIndex (inclusive) to toIndex (exclusive)
        Parameters:
        fromIndex - inclusive
        toIndex - exclusive
      • set

        void set​(BitSet bs)
        Copy bits state of source BitSet object to this object
        Parameters:
        bs - - BitSet source
      • not

        void not()
        Executes NOT operation over all bits
      • set

        void set​(long fromIndex,
                 long toIndex)
        Set all bits to one from fromIndex (inclusive) to toIndex (exclusive)
        Parameters:
        fromIndex - inclusive
        toIndex - exclusive
      • size

        long size()
        Returns number of set bits.
        Returns:
        number of set bits.
      • get

        boolean get​(long bitIndex)
        Returns true if bit set to one and false overwise.
        Parameters:
        bitIndex - - index of bit
        Returns:
        true if bit set to one and false overwise.
      • set

        boolean set​(long bitIndex)
        Set bit to one at specified bitIndex
        Parameters:
        bitIndex - - index of bit
        Returns:
        true - if previous value was true, false - if previous value was false
      • set

        void set​(long bitIndex,
                 boolean value)
        Set bit to value at specified bitIndex
        Parameters:
        bitIndex - - index of bit
        value - true = 1, false = 0
      • toByteArray

        byte[] toByteArray()
      • cardinality

        long cardinality()
        Returns the number of bits set to one.
        Returns:
        number of bits
      • clear

        boolean clear​(long bitIndex)
        Set bit to zero at specified bitIndex
        Parameters:
        bitIndex - - index of bit
        Returns:
        true - if previous value was true, false - if previous value was false
      • clear

        void clear()
        Set all bits to zero
      • or

        void or​(String... bitSetNames)
        Executes OR operation over this object and specified bitsets. Stores result into this object.
        Parameters:
        bitSetNames - - name of stored bitsets
      • and

        void and​(String... bitSetNames)
        Executes AND operation over this object and specified bitsets. Stores result into this object.
        Parameters:
        bitSetNames - - name of stored bitsets
      • xor

        void xor​(String... bitSetNames)
        Executes XOR operation over this object and specified bitsets. Stores result into this object.
        Parameters:
        bitSetNames - - name of stored bitsets