# DataHandleOutput (ARX API Documentation)

org.deidentifier.arx

## Class DataHandleOutput

- java.lang.Object
- - org.deidentifier.arx.DataHandle
  - - org.deidentifier.arx.DataHandleOutput

-     public class DataHandleOutput
      extends DataHandle

  An implementation of the class DataHandle for output data.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `class` | `DataHandleOutput.ResultIterator` The class ResultIterator.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `getAttributeName(int col)` Gets the attribute name.
    `DataType<?>` | `getDataType(java.lang.String attribute)` Returns the according data type.
    `int` | `getGeneralization(java.lang.String attribute)` Returns the generalization level for the attribute.
    `int` | `getNumColumns()` Gets the num columns.
    `int` | `getNumRows()` Gets the num rows.
    `StatisticsBuilder` | `getStatistics()` Returns an object providing access to basic descriptive statistics about the data represented by this handle.
    `java.lang.String` | `getValue(int row, int col)` Gets the value.
    `boolean` | `isOptimized()` Has this handle been optimized with local recoding?
    `java.util.Iterator<java.lang.String[]>` | `iterator()` Iterator.
    `boolean` | `replace(int column, java.lang.String original, java.lang.String replacement)` Replaces the original value with the replacement in the given column.
    `void` | `updateData(DataHandle data, java.util.Map<java.lang.String,DataType<?>> types, int[] outliers)` Used to update data when loading projects after local recoding.

    - ### Methods inherited from class org.deidentifier.arx.DataHandle

      `getColumnIndexOf, getDate, getDefinition, getDistinctValues, getDouble, getFloat, getInt, getLong, getMatchingDataTypes, getMatchingDataTypes, getMatchingDataTypes, getMatchingDataTypes, getMatchingDataTypes, getMatchingDataTypes, getMatchingDataTypes, getMatchingDataTypes, getNonConformingValues, getNumConformingValues, getRiskEstimator, getRiskEstimator, getRiskEstimator, getRiskEstimator, getRiskEstimator, getRiskEstimator, getTransformation, getView, isOrphaned, isOutlier, release, render, save, save, save, save, save, save, save, save, save, sort, sort, sort, sort, swap`

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

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

- - ### Method Detail

    - #### getAttributeName

          public java.lang.String getAttributeName(int col)

      Gets the attribute name.
      Specified by:
        `getAttributeName` in class `DataHandle`
      Parameters:
        `col` - the col
      Returns:
        the attribute name

    - #### getDataType

          public DataType<?> getDataType(java.lang.String attribute)

      Description copied from class: `DataHandle`
      Returns the according data type.
      Overrides:
        `getDataType` in class `DataHandle`
      Parameters:
        `attribute` - the attribute
      Returns:
        the data type

    - #### getGeneralization

          public int getGeneralization(java.lang.String attribute)

      Description copied from class: `DataHandle`
      Returns the generalization level for the attribute.
      Specified by:
        `getGeneralization` in class `DataHandle`
      Parameters:
        `attribute` - the attribute
      Returns:
        the generalization

    - #### getNumColumns

          public int getNumColumns()

      Gets the num columns.
      Specified by:
        `getNumColumns` in class `DataHandle`
      Returns:
        the num columns

    - #### getNumRows

          public int getNumRows()

      Gets the num rows.
      Specified by:
        `getNumRows` in class `DataHandle`
      Returns:
        the num rows

    - #### getStatistics

          public StatisticsBuilder getStatistics()

      Description copied from class: `DataHandle`
      Returns an object providing access to basic descriptive statistics about the data represented by this handle.
      Specified by:
        `getStatistics` in class `DataHandle`
      Returns:
        the statistics

    - #### getValue

          public java.lang.String getValue(int row,
                                  int col)

      Gets the value.
      Specified by:
        `getValue` in class `DataHandle`
      Parameters:
        `row` - the row
        `col` - the col
      Returns:
        the value

    - #### isOptimized

          public boolean isOptimized()

      Description copied from class: `DataHandle`
      Has this handle been optimized with local recoding?
      Overrides:
        `isOptimized` in class `DataHandle`
      Returns:

    - #### iterator

          public java.util.Iterator<java.lang.String[]> iterator()

      Iterator.
      Specified by:
        `iterator` in class `DataHandle`
      Returns:
        the iterator

    - #### replace

          public boolean replace(int column,
                        java.lang.String original,
                        java.lang.String replacement)

      Description copied from class: `DataHandle`
      Replaces the original value with the replacement in the given column. Only supported by handles for input data.
      Overrides:
        `replace` in class `DataHandle`
      Parameters:
        `column` - the column
        `original` - the original
        `replacement` - the replacement
      Returns:
        Whether the original value was found

    - #### updateData

          public void updateData(DataHandle data,
                        java.util.Map<java.lang.String,DataType<?>> types,
                        int[] outliers)

      Used to update data when loading projects after local recoding. This is part of the internal API and should never be called by users
      Parameters:
        `data` -
        `types` -