Package: java.util

## [Java] Class BitSet

- java.util.BitSet

-     public class BitSet
      extends Object

  GDK enhancements for BitSet.

  displayName:
    BitSet
  receiverFqcn:
    java.util.BitSet

- - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public BitSet` | `and(BitSet right)` Bitwise AND together two BitSets.
    `` | `public BitSet` | `bitwiseNegate()` Bitwise NEGATE a BitSet.
    `` | `public boolean` | `getAt(int index)` Support the subscript operator for a Bitset
    `` | `public BitSet` | `getAt(IntRange range)` Support retrieving a subset of a BitSet using a Range
    `` | `public BitSet` | `leftShift(Number operand)` Implementation of the left shift operator for BitSets, returning a new BitSet and leaving the original unchanged.
    `` | `public BitSet` | `or(BitSet right)` Bitwise OR together two BitSets.
    `` | `public void` | `putAt(IntRange range, boolean value)` Support assigning a range of values with a single assignment statement.
    `` | `public void` | `putAt(int index, boolean value)` Support subscript-style assignment for a BitSet.
    `` | `public BitSet` | `rightShift(Number operand)` Implementation of the right shift operator for BitSets, returning a new BitSet and leaving the original unchanged.
    `` | `public BitSet` | `rightShiftUnsigned(Number operand)` Implementation of the right shift (unsigned) operator for BitSets, returning a new BitSet and leaving the original unchanged.
    `` | `public BitSet` | `xor(BitSet right)` Bitwise XOR together two BitSets.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Object` | `addShutdownHook, any, any, asBoolean, asType, collect, collect, collect, dump, each, eachMatch, eachMatch, eachWithIndex, every, every, find, find, findAll, findAll, findIndexOf, findIndexOf, findIndexValues, findIndexValues, findLastIndexOf, findLastIndexOf, findResult, findResult, findResult, findResult, getAt, getMetaClass, getMetaPropertyValues, getProperties, grep, grep, hasProperty, identity, inject, inject, inspect, invokeMethod, is, isCase, isNotCase, iterator, metaClass, print, print, printf, printf, println, println, println, putAt, respondsTo, respondsTo, setMetaClass, sleep, sleep, split, sprintf, sprintf, stream, tap, toString, use, use, use, with, with, withCloseable, withCloseable, withMethodClosure, withStream, withStream, withTraits`

- - ### Method Detail

    - #### public BitSet and(BitSet right)

      Bitwise AND together two BitSets.

      Parameters:
        `right` - another BitSet to bitwise AND
      Returns:
        the bitwise AND of both BitSets
      Since:
        1.5.0

    - #### public BitSet bitwiseNegate()

      Bitwise NEGATE a BitSet.

      Returns:
        the bitwise NEGATE of the BitSet
      Since:
        1.5.0

    - #### public boolean getAt(int index)

      Support the subscript operator for a Bitset

      Parameters:
        `index` - index to retrieve
      Returns:
        value of the bit at the given index
      See Also:
        BitSet
      Since:
        1.5.0

    - #### public BitSet getAt(IntRange range)

      Support retrieving a subset of a BitSet using a Range

      Parameters:
        `range` - a Range defining the desired subset
      Returns:
        a new BitSet that represents the requested subset
      See Also:
        BitSet
        IntRange
      Since:
        1.5.0

    - #### public BitSet leftShift(Number operand)

      Implementation of the left shift operator for BitSets, returning a new BitSet and leaving the original unchanged. The `intValue()` is taken for the shift distance for non-integer operands.

      Parameters:
        `operand` - the shift distance by which to shift the BitSet left
      Returns:
        the resulting BitSet
      Since:
        5.0.0

    - #### public BitSet or(BitSet right)

      Bitwise OR together two BitSets. Called when the '|' operator is used between two bit sets.

      Parameters:
        `right` - another BitSet to bitwise OR
      Returns:
        the bitwise OR of both BitSets
      Since:
        1.5.0

    - #### public void putAt(IntRange range, boolean value)

      Support assigning a range of values with a single assignment statement.

      Parameters:
        `range` - the range of values to set
        `value` - value
      See Also:
        BitSet
        Range
      Since:
        1.5.0

    - #### public void putAt(int index, boolean value)

      Support subscript-style assignment for a BitSet.

      Parameters:
        `index` - index of the entry to set
        `value` - value
      See Also:
        BitSet
      Since:
        1.5.0

    - #### public BitSet rightShift(Number operand)

      Implementation of the right shift operator for BitSets, returning a new BitSet and leaving the original unchanged. The `intValue()` is taken for the shift distance for non-integer operands.

      Parameters:
        `operand` - the shift distance by which to right shift the BitSet
      Returns:
        the resulting BitSet
      Since:
        5.0.0

    - #### public BitSet rightShiftUnsigned(Number operand)

      Implementation of the right shift (unsigned) operator for BitSets, returning a new BitSet and leaving the original unchanged. The `intValue()` is taken for the shift distance for non-integer operands.

      Parameters:
        `operand` - the shift distance by which to right shift (unsigned) the BitSet
      Returns:
        the resulting BitSet
      Since:
        5.0.0

    - #### public BitSet xor(BitSet right)

      Bitwise XOR together two BitSets. Called when the '^' operator is used between two bit sets.

      Parameters:
        `right` - another BitSet to bitwise XOR
      Returns:
        the bitwise XOR of both BitSets
      Since:
        1.5.0