# ModelLDiversityCriterion (ARX GUI Documentation)

org.deidentifier.arx.gui.model

## Class ModelLDiversityCriterion

- java.lang.Object
- - org.deidentifier.arx.gui.model.ModelCriterion
  - - org.deidentifier.arx.gui.model.ModelExplicitCriterion
    - - org.deidentifier.arx.gui.model.ModelLDiversityCriterion

- All Implemented Interfaces:
    java.io.Serializable

      public class ModelLDiversityCriterion
      extends ModelExplicitCriterion

  This class implements a model for the l-diversity criterion.
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `VARIANT_DISTINCT` Variant.
    `static int` | `VARIANT_GRASSBERGER_ENTROPY` Variant.
    `static int` | `VARIANT_RECURSIVE` Variant.
    `static int` | `VARIANT_SHANNON_ENTROPY` Variant.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ModelLDiversityCriterion(java.lang.String attribute)` Creates a new instance.
    `ModelLDiversityCriterion(java.lang.String attribute, int variant, int l, double c)` Creates a new instance.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `ModelLDiversityCriterion` | `clone()` Clone
    `double` | `getC()` Gets C.
    `PrivacyCriterion` | `getCriterion(Model model)` Implement this to return the criterion.
    `int` | `getL()` Returns L.
    `java.lang.String` | `getLabel()` Implement this to return a string representation.
    `int` | `getVariant()` Returns the variant.
    `void` | `parse(ModelCriterion criterion, boolean _default)` Parse
    `void` | `pull(ModelExplicitCriterion criterion)` Implement this, to update data.
    `void` | `setC(double c)` Sets C.
    `void` | `setL(int l)` Sets L.
    `void` | `setVariant(int variant)` Sets the variant.
    `java.lang.String` | `toString()` Implement this to return a string representation.

    - ### Methods inherited from class org.deidentifier.arx.gui.model.ModelExplicitCriterion

      `getAttribute`

    - ### Methods inherited from class org.deidentifier.arx.gui.model.ModelCriterion

      `isEnabled, setEnabled`

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

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

- - ### Field Detail

    - #### VARIANT_DISTINCT

          public static final int VARIANT_DISTINCT

      Variant.
      See Also:
        Constant Field Values

    - #### VARIANT_SHANNON_ENTROPY

          public static final int VARIANT_SHANNON_ENTROPY

      Variant.
      See Also:
        Constant Field Values

    - #### VARIANT_GRASSBERGER_ENTROPY

          public static final int VARIANT_GRASSBERGER_ENTROPY

      Variant.
      See Also:
        Constant Field Values

    - #### VARIANT_RECURSIVE

          public static final int VARIANT_RECURSIVE

      Variant.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### ModelLDiversityCriterion

          public ModelLDiversityCriterion(java.lang.String attribute)

      Creates a new instance.
      Parameters:
        `attribute` -

    - #### ModelLDiversityCriterion

          public ModelLDiversityCriterion(java.lang.String attribute,
                                  int variant,
                                  int l,
                                  double c)

      Creates a new instance.
      Parameters:
        `attribute` -
        `variant` -
        `l` -
        `c` -

  - ### Method Detail

    - #### clone

          public ModelLDiversityCriterion clone()

      Description copied from class: `ModelCriterion`
      Clone
      Specified by:
        `clone` in class `ModelCriterion`

    - #### getC

          public double getC()

      Gets C.
      Returns:

    - #### getCriterion

          public PrivacyCriterion getCriterion(Model model)

      Description copied from class: `ModelCriterion`
      Implement this to return the criterion.
      Specified by:
        `getCriterion` in class `ModelCriterion`
      Returns:

    - #### getL

          public int getL()

      Returns L.
      Returns:

    - #### getLabel

          public java.lang.String getLabel()

      Description copied from class: `ModelCriterion`
      Implement this to return a string representation.
      Specified by:
        `getLabel` in class `ModelCriterion`
      Returns:

    - #### getVariant

          public int getVariant()

      Returns the variant.
      Returns:

    - #### parse

          public void parse(ModelCriterion criterion,
                   boolean _default)

      Description copied from class: `ModelCriterion`
      Parse
      Specified by:
        `parse` in class `ModelCriterion`
        `_default` - Defines whether the model represents a typical parameter configuration for the criterion

    - #### pull

          public void pull(ModelExplicitCriterion criterion)

      Description copied from class: `ModelExplicitCriterion`
      Implement this, to update data.
      Specified by:
        `pull` in class `ModelExplicitCriterion`

    - #### setC

          public void setC(double c)

      Sets C.
      Parameters:
        `c` -

    - #### setL

          public void setL(int l)

      Sets L.
      Parameters:
        `l` -

    - #### setVariant

          public void setVariant(int variant)

      Sets the variant.
      Parameters:
        `variant` -

    - #### toString

          public java.lang.String toString()

      Description copied from class: `ModelCriterion`
      Implement this to return a string representation.
      Specified by:
        `toString` in class `ModelCriterion`