org.deidentifier.arx.criteria

## Class KAnonymity

- java.lang.Object
- - org.deidentifier.arx.criteria.PrivacyCriterion
  - - org.deidentifier.arx.criteria.ImplicitPrivacyCriterion
    - - org.deidentifier.arx.criteria.KAnonymity

All Implemented Interfaces:
  java.io.Serializable

    public class KAnonymity
    extends ImplicitPrivacyCriterion

The k-anonymity criterion Published in: Sweeney L. k-anonymity: A model for protecting privacy. International Journal of Uncertainty, Fuzziness and Knowledge-Based Systems. 2002;10(5):557 - 570.

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

### Constructor Summary

Constructors
Constructor and Description
`KAnonymity(int k)` Creates a new instance of the k-anonymity criterion as proposed in Sweeney L. k-Anonymity: A model for protecting privacy.

### Method Summary

All Methods Instance Methods Concrete Methods
`KAnonymity` `clone()` Clone
`int` `getK()` Returns the parameter k.
`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` `isAnonymous(Transformation<?> node, HashGroupifyEntry entry)` Implement this, to enforce the criterion.
`boolean` `isLocalRecodingSupported()` Returns whether the criterion supports local recoding.
`boolean` `isMinimalClassSizeAvailable()` If a privacy model provides a prosecutor risk threshold, it should override this method to enable optimizations
`ElementData` `render()` Renders the privacy model
`java.lang.String` `toString()` Returns a string representation.

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

`clone, getDataSubset, getPopulationModel, getSubset, initialize, isHeuristicSearchSupported, isHeuristicSearchWithTimeLimitSupported, isMonotonicWithGeneralization, isMonotonicWithSuppression, isOptimalSearchSupported, isSampleBased, isSubsetAvailable`

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

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

### Constructor Detail

#### KAnonymity

    public KAnonymity(int k)

Creates a new instance of the k-anonymity criterion as proposed in Sweeney L. k-Anonymity: A model for protecting privacy. International Journal of Uncertainty, Fuzziness and Knowledge-Based Systems. 2002;10(5):557 - 570.

Parameters:
  `k` -

### Method Detail

#### clone

    public KAnonymity clone()

Description copied from class: `PrivacyCriterion`
Clone

Specified by:
  `clone` in class `PrivacyCriterion`

#### getK

    public int getK()

Returns the parameter k.

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:

#### isAnonymous

    public boolean isAnonymous(Transformation<?> node,
                               HashGroupifyEntry entry)

Description copied from class: `PrivacyCriterion`
Implement this, to enforce the criterion.

Specified by:
  `isAnonymous` in class `PrivacyCriterion`
Parameters:
  `node` - TODO
Returns:

#### isLocalRecodingSupported

    public boolean isLocalRecodingSupported()

Description copied from class: `PrivacyCriterion`
Returns whether the criterion supports local recoding.

Specified by:
  `isLocalRecodingSupported` 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:

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