org.deidentifier.arx.framework.data

## Class Dictionary

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

All Implemented Interfaces:
  java.io.Serializable

    public class Dictionary
    extends java.lang.Object
    implements java.io.Serializable

A dictionary mapping integers to strings for different dimensions.

Author:
  Fabian Prasser, Florian Kohlmayer
See Also:
  Serialized Form

### Constructor Summary

Constructors
Constructor and Description
`Dictionary(Dictionary input, int[] columns)` Instantiates a new dictionary by extracting a projection of the given dictionary
`Dictionary(int dimensions)` Instantiates a new dictionary.

### Method Summary

All Methods Instance Methods Concrete Methods
`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[]` `getSuppressedCodes()` Returns the codes for suppressed values
`com.carrotsearch.hppc.ObjectIntOpenHashMap<java.lang.String>` `getUnfinalizedValues(int dimension)` Returns the map with unfinalized values for the given dimension
`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.
`void` `registerSpecialValues()` Registers special values

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

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

### Constructor Detail

#### Dictionary

    public Dictionary(Dictionary input,
                      int[] columns)

Instantiates a new dictionary by extracting a projection of the given dictionary

Parameters:
  `dimensions` -

#### Dictionary

    public Dictionary(int dimensions)

Instantiates a new dictionary.

Parameters:
  `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:

#### getSuppressedCodes

    public int[] getSuppressedCodes()

Returns the codes for suppressed values

Returns:

#### getUnfinalizedValues

    public com.carrotsearch.hppc.ObjectIntOpenHashMap<java.lang.String> getUnfinalizedValues(int dimension)

Returns the map with unfinalized values for the given dimension

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` -

#### registerSpecialValues

    public void registerSpecialValues()

Registers special values