# RowSet (ARX Developer Documentation)

org.deidentifier.arx

## Class RowSet

- java.lang.Object
- - org.deidentifier.arx.RowSet

- All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable

      public class RowSet
      extends java.lang.Object
      implements java.io.Serializable, java.lang.Cloneable

  A set of rows.
  See Also:
    Serialized Form

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `add(int rowIndex)` Sets a bit
    `RowSet` | `clone()`
    `boolean` | `contains(int rowIndex)` Checks whether the bit is set
    `static RowSet` | `create(Data data)` Creates a new instance
    `static RowSet` | `create(int length)` Creates a new instance
    `int` | `length()` Returns the number of available bits
    `void` | `remove(int rowIndex)` Unsets a bit
    `int` | `size()` Returns the number of bits set
    `void` | `swap(int rowIndex1, int rowIndex2)` Swaps two bits

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

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

- - ### Method Detail

    - #### create

          public static RowSet create(Data data)

      Creates a new instance
      Parameters:
        `data` -
      Returns:

    - #### create

          public static RowSet create(int length)

      Creates a new instance
      Parameters:
        `length` -
      Returns:

    - #### add

          public void add(int rowIndex)

      Sets a bit
      Parameters:
        `rowIndex` -

    - #### clone

          public RowSet clone()

      Overrides:
        `clone` in class `java.lang.Object`

    - #### contains

          public boolean contains(int rowIndex)

      Checks whether the bit is set
      Parameters:
        `rowIndex` -
      Returns:

    - #### length

          public int length()

      Returns the number of available bits
      Returns:

    - #### remove

          public void remove(int rowIndex)

      Unsets a bit
      Parameters:
        `rowIndex` -

    - #### size

          public int size()

      Returns the number of bits set
      Returns:

    - #### swap

          public void swap(int rowIndex1,
                  int rowIndex2)

      Swaps two bits
      Parameters:
        `rowIndex1` -
        `rowIndex2` -