# ModelRiskBasedCriterion (ARX GUI Documentation)

org.deidentifier.arx.gui.model

## Class ModelRiskBasedCriterion

- java.lang.Object
- - org.deidentifier.arx.gui.model.ModelCriterion
  - - org.deidentifier.arx.gui.model.ModelImplicitCriterion
    - - org.deidentifier.arx.gui.model.ModelRiskBasedCriterion

- All Implemented Interfaces:
    java.io.Serializable

      public class ModelRiskBasedCriterion
      extends ModelImplicitCriterion

  This class implements a model for risk-based criteria
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `VARIANT_AVERAGE_RISK` Variant.
    `static int` | `VARIANT_POPULATION_UNIQUES_DANKAR` Variant.
    `static int` | `VARIANT_POPULATION_UNIQUES_PITMAN` Variant.
    `static int` | `VARIANT_POPULATION_UNIQUES_SNB` Variant.
    `static int` | `VARIANT_POPULATION_UNIQUES_ZAYATZ` Variant.
    `static int` | `VARIANT_SAMPLE_UNIQUES` Variant.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ModelRiskBasedCriterion(int variant)` Creates a new instance
    `ModelRiskBasedCriterion(int variant, double threshold)` Creates a new instance

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `ModelRiskBasedCriterion` | `clone()` Clone
    `PrivacyCriterion` | `getCriterion(Model model)` Implement this to return the criterion.
    `java.lang.String` | `getLabel()` Implement this to return a string representation.
    `double` | `getThreshold()` Returns the threshold.
    `int` | `getVariant()` Returns the variant
    `void` | `parse(ModelCriterion criterion, boolean _default)` Parse
    `void` | `setThreshold(double threshold)` Sets the threshold.
    `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.ModelCriterion

      `isEnabled, setEnabled`

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

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

- - ### Field Detail

    - #### VARIANT_AVERAGE_RISK

          public static final int VARIANT_AVERAGE_RISK

      Variant.
      See Also:
        Constant Field Values

    - #### VARIANT_SAMPLE_UNIQUES

          public static final int VARIANT_SAMPLE_UNIQUES

      Variant.
      See Also:
        Constant Field Values

    - #### VARIANT_POPULATION_UNIQUES_DANKAR

          public static final int VARIANT_POPULATION_UNIQUES_DANKAR

      Variant.
      See Also:
        Constant Field Values

    - #### VARIANT_POPULATION_UNIQUES_PITMAN

          public static final int VARIANT_POPULATION_UNIQUES_PITMAN

      Variant.
      See Also:
        Constant Field Values

    - #### VARIANT_POPULATION_UNIQUES_ZAYATZ

          public static final int VARIANT_POPULATION_UNIQUES_ZAYATZ

      Variant.
      See Also:
        Constant Field Values

    - #### VARIANT_POPULATION_UNIQUES_SNB

          public static final int VARIANT_POPULATION_UNIQUES_SNB

      Variant.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### ModelRiskBasedCriterion

          public ModelRiskBasedCriterion(int variant)

      Creates a new instance
      Parameters:
        `variant` -

    - #### ModelRiskBasedCriterion

          public ModelRiskBasedCriterion(int variant,
                                 double threshold)

      Creates a new instance
      Parameters:
        `variant` -
        `threshold` -

  - ### Method Detail

    - #### clone

          public ModelRiskBasedCriterion clone()

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

    - #### getCriterion

          public PrivacyCriterion getCriterion(Model model)

      Description copied from class: `ModelCriterion`
      Implement this to return the criterion.
      Specified by:
        `getCriterion` in class `ModelCriterion`
      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:

    - #### getThreshold

          public double getThreshold()

      Returns the threshold.
      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

    - #### setThreshold

          public void setThreshold(double threshold)

      Sets the threshold.
      Parameters:
        `k` -

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