# Dictionary (ARX Developer Documentation)

org.deidentifier.arx.framework.data

## Class Dictionary

- java.lang.Object
- - org.deidentifier.arx.framework.data.Dictionary

-     public class Dictionary
      extends java.lang.Object

  A dictionary mapping integers to strings for different dimensions.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Dictionary(int dimensions)` Instantiates a new dictionary.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `definalizeAll()` Definalizes the dictionary
    `void` | `finalizeAll()` Finalizes all dimensions.
    `java.lang.String[][]` | `getMapping()` Returns the mapping array.
    `int` | `getNumDimensions()` Returns the number of dimensions in the dictionary.
    `int` | `getNumUniqueUnfinalizedValues(int dimension)` Returns the number of unique values contained before finalizing the dictionary.
    `java.lang.Integer` | `probe(int dimension, java.lang.String string)` Returns the registered value if present, null otherwise.
    `int` | `register(int dimension, java.lang.String string)` Registers a new string at the dictionary.
    `void` | `registerAll(int targetDimension, Dictionary dictionary, int sourceDimension)` Merges this dictionary with another dictionary.

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

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

- - ### Constructor Detail

    - #### Dictionary

          public Dictionary(int dimensions)

      Instantiates a new dictionary.
      Parameters:
        `dimensions` - the dimensions

  - ### Method Detail

    - #### definalizeAll

          public void definalizeAll()

      Definalizes the dictionary

    - #### finalizeAll

          public void finalizeAll()

      Finalizes all dimensions.

    - #### getMapping

          public java.lang.String[][] getMapping()

      Returns the mapping array.
      Returns:

    - #### getNumDimensions

          public int getNumDimensions()

      Returns the number of dimensions in the dictionary.
      Returns:

    - #### getNumUniqueUnfinalizedValues

          public int getNumUniqueUnfinalizedValues(int dimension)

      Returns the number of unique values contained before finalizing the dictionary.
      Parameters:
        `dimension` -
      Returns:

    - #### probe

          public java.lang.Integer probe(int dimension,
                                java.lang.String string)

      Returns the registered value if present, null otherwise.
      Parameters:
        `dimension` -
        `string` -
      Returns:

    - #### register

          public int register(int dimension,
                     java.lang.String string)

      Registers a new string at the dictionary.
      Parameters:
        `dimension` - the dimension
        `string` - the string
      Returns:
        the int

    - #### registerAll

          public void registerAll(int targetDimension,
                         Dictionary dictionary,
                         int sourceDimension)

      Merges this dictionary with another dictionary.
      Parameters:
        `targetDimension` -
        `dictionary` -
        `sourceDimension` -