# SampleUniqueness (ARX Developer Documentation)

org.deidentifier.arx.criteria

## Class SampleUniqueness

- java.lang.Object
- - org.deidentifier.arx.criteria.PrivacyCriterion
  - - org.deidentifier.arx.criteria.SampleBasedCriterion
    - - org.deidentifier.arx.criteria.RiskBasedCriterion
      - - org.deidentifier.arx.criteria.SampleUniqueness

- All Implemented Interfaces:
    java.io.Serializable

      public class SampleUniqueness
      extends RiskBasedCriterion

  This criterion ensures that the sample uniqueness falls below a given threshold.
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SampleUniqueness(double riskThreshold)` Creates a new instance of this criterion.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `SampleUniqueness` | `clone()` Clone
    `double` | `getRiskThresholdMarketer()` Return marketer risk threshold, 1 if there is none
    `protected boolean` | `isFulfilled(HashGroupifyDistribution distribution)` To be implemented by risk-based criteria
    `boolean` | `isLocalRecodingSupported()` Returns whether the criterion supports local recoding.
    `ElementData` | `render()` Renders the privacy model
    `java.lang.String` | `toString()` Returns a string representation.

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

      `enforce, getRequirements, getRiskThreshold`

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

      `isAnonymous, isSampleBased`

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

      `clone, getDataSubset, getMinimalClassSize, getPopulationModel, getRiskThresholdJournalist, getRiskThresholdProsecutor, getSubset, initialize, isMinimalClassSizeAvailable, isMonotonicWithGeneralization, isMonotonicWithSuppression, isSubsetAvailable`

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

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

- - ### Constructor Detail

    - #### SampleUniqueness

          public SampleUniqueness(double riskThreshold)

      Creates a new instance of this criterion.
      Parameters:
        `riskThreshold` -

  - ### Method Detail

    - #### clone

          public SampleUniqueness clone()

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

    - #### getRiskThresholdMarketer

          public double getRiskThresholdMarketer()

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

    - #### isLocalRecodingSupported

          public boolean isLocalRecodingSupported()

      Description copied from class: `PrivacyCriterion`
      Returns whether the criterion supports local recoding.
      Specified by:
        `isLocalRecodingSupported` in class `PrivacyCriterion`
      Returns:

    - #### render

          public ElementData render()

      Description copied from class: `PrivacyCriterion`
      Renders the privacy model
      Specified by:
        `render` in class `PrivacyCriterion`
      Returns:

    - #### toString

          public java.lang.String toString()

      Description copied from class: `PrivacyCriterion`
      Returns a string representation.
      Specified by:
        `toString` in class `PrivacyCriterion`

    - #### isFulfilled

          protected boolean isFulfilled(HashGroupifyDistribution distribution)

      Description copied from class: `RiskBasedCriterion`
      To be implemented by risk-based criteria
      Specified by:
        `isFulfilled` in class `RiskBasedCriterion`
      Returns: