com.hazelcast.util

## Class BitSetUtils

- java.lang.Object
- - com.hazelcast.util.BitSetUtils

-     public final class BitSetUtils
      extends Object

  Convenient method for BitSet manipulations

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static boolean` | `hasAllBitsSet(BitSet bitSet, Iterable<Integer> indexes)` Returns true if all bits at given `indexes` are set.
    `static boolean` | `hasAtLeastOneBitSet(BitSet bitSet, Iterable<Integer> indexes)` Returns true if at least one bit on a given position is set.
    `static void` | `setBits(BitSet bitSet, Iterable<Integer> indexes)` Set all bits on a given positions.
    `static void` | `unsetBits(BitSet bitSet, Iterable<Integer> indexes)` Unsets all bits on a given positions.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### hasAtLeastOneBitSet

          public static boolean hasAtLeastOneBitSet(BitSet bitSet,
                                                    Iterable<Integer> indexes)

      Returns true if at least one bit on a given position is set.
      Parameters:
        `bitSet` - the `BitSet` to modify
        `indexes` - the index positions to check
      Returns:
        `true` if `BitSet` contains at least one bit at any position from index which is set, otherwise returns `false`

    - #### hasAllBitsSet

          public static boolean hasAllBitsSet(BitSet bitSet,
                                              Iterable<Integer> indexes)

      Returns true if all bits at given `indexes` are set.
      Parameters:
        `bitSet` - the `BitSet` to modify
        `indexes` - the index positions to check
      Returns:
        `true` if `BitSet` all bits at given `indexes` are set. otherwise returns `false`

    - #### setBits

          public static void setBits(BitSet bitSet,
                                     Iterable<Integer> indexes)

      Set all bits on a given positions.
      Parameters:
        `bitSet` - the `BitSet` to modify
        `indexes` - the index positions to set

    - #### unsetBits

          public static void unsetBits(BitSet bitSet,
                                       Iterable<Integer> indexes)

      Unsets all bits on a given positions.
      Parameters:
        `bitSet` - the `BitSet` to modify
        `indexes` - the index positions to set

Copyright © 2019. All rights reserved.