# LDiversity (ARX GUI Documentation)

org.deidentifier.arx.criteria

## Class LDiversity

- java.lang.Object
- - org.deidentifier.arx.criteria.PrivacyCriterion
  - - org.deidentifier.arx.criteria.ExplicitPrivacyCriterion
    - - org.deidentifier.arx.criteria.LDiversity

- All Implemented Interfaces:
    java.io.Serializable
  Direct Known Subclasses:
    DistinctLDiversity, EntropyLDiversity, RecursiveCLDiversity

      public abstract class LDiversity
      extends ExplicitPrivacyCriterion

  An abstract base class for l-diversity criteria Published in: Machanavajjhala A, Kifer D, Gehrke J. l-diversity: Privacy beyond k-anonymity. Transactions on Knowledge Discovery from Data (TKDD). 2007;1(1):3.
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected double` | `l` The parameter l.
    `protected int` | `minSize` The derived minimal size of a class

    - ### Fields inherited from class org.deidentifier.arx.criteria.ExplicitPrivacyCriterion

      `attribute, index`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `LDiversity(java.lang.String attribute, double l, boolean monotonicWithSuppression, boolean monotonicWithGeneralization)` Creates a new instance.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `double` | `getL()` Returns the parameter l.
    `int` | `getMinimalClassSize()` If a privacy model provides a prosecutor risk threshold, it should override this method to enable optimizations
    `int` | `getRequirements()` Returns the criterion's requirements.
    `double` | `getRiskThresholdJournalist()` Return journalist risk threshold, 1 if there is none
    `double` | `getRiskThresholdMarketer()` Return marketer risk threshold, 1 if there is none
    `double` | `getRiskThresholdProsecutor()` Return prosecutor risk threshold, 1 if there is none
    `boolean` | `isMinimalClassSizeAvailable()` If a privacy model provides a prosecutor risk threshold, it should override this method to enable optimizations

    - ### Methods inherited from class org.deidentifier.arx.criteria.ExplicitPrivacyCriterion

      `getAttribute, initialize`

    - ### Methods inherited from class org.deidentifier.arx.criteria.PrivacyCriterion

      `clone, clone, getDataSubset, getPopulationModel, getSubset, isAnonymous, isLocalRecodingSupported, isMonotonicWithGeneralization, isMonotonicWithSuppression, isSampleBased, isSubsetAvailable, render, toString`

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

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

- - ### Field Detail

    - #### l

          protected final double l

      The parameter l.

    - #### minSize

          protected final int minSize

      The derived minimal size of a class

  - ### Constructor Detail

    - #### LDiversity

          public LDiversity(java.lang.String attribute,
                    double l,
                    boolean monotonicWithSuppression,
                    boolean monotonicWithGeneralization)

      Creates a new instance.
      Parameters:
        `attribute` -
        `l` -
        `monotonicWithSuppression` -
        `monotonicWithGeneralization` -

  - ### Method Detail

    - #### getL

          public double getL()

      Returns the parameter l.
      Returns:

    - #### getMinimalClassSize

          public int getMinimalClassSize()

      Description copied from class: `PrivacyCriterion`
      If a privacy model provides a prosecutor risk threshold, it should override this method to enable optimizations
      Overrides:
        `getMinimalClassSize` in class `PrivacyCriterion`
      Returns:

    - #### getRequirements

          public int getRequirements()

      Description copied from class: `PrivacyCriterion`
      Returns the criterion's requirements.
      Specified by:
        `getRequirements` in class `PrivacyCriterion`
      Returns:

    - #### getRiskThresholdJournalist

          public double getRiskThresholdJournalist()

      Return journalist risk threshold, 1 if there is none
      Overrides:
        `getRiskThresholdJournalist` in class `PrivacyCriterion`
      Returns:

    - #### getRiskThresholdMarketer

          public double getRiskThresholdMarketer()

      Return marketer risk threshold, 1 if there is none
      Overrides:
        `getRiskThresholdMarketer` in class `PrivacyCriterion`
      Returns:

    - #### getRiskThresholdProsecutor

          public double getRiskThresholdProsecutor()

      Return prosecutor risk threshold, 1 if there is none
      Overrides:
        `getRiskThresholdProsecutor` in class `PrivacyCriterion`
      Returns:

    - #### isMinimalClassSizeAvailable

          public boolean isMinimalClassSizeAvailable()

      Description copied from class: `PrivacyCriterion`
      If a privacy model provides a prosecutor risk threshold, it should override this method to enable optimizations
      Overrides:
        `isMinimalClassSizeAvailable` in class `PrivacyCriterion`
      Returns: