# DomainShareRedaction (ARX Developer Documentation)

org.deidentifier.arx.metric.v2

## Class DomainShareRedaction

- java.lang.Object
- - org.deidentifier.arx.metric.v2.DomainShareRedaction

- All Implemented Interfaces:
    java.io.Serializable, DomainShare

      public class DomainShareRedaction
      extends java.lang.Object
      implements DomainShare

  This class represents a set of domain shares for an attribute. The shares are derived from a functional redaction-based generalization hierarchy
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DomainShareRedaction(HierarchyBuilderRedactionBased<?> builder)` Creates a new set of domain shares derived from the given functional redaction-based hierarchy.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `DomainShareRedaction` | `clone()` Clones the share
    `double` | `getDomainSize()` Returns the size of the domain.
    `double` | `getShare(int value, int level)` Returns the share of the given value.

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

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

- - ### Constructor Detail

    - #### DomainShareRedaction

          public DomainShareRedaction(HierarchyBuilderRedactionBased<?> builder)

      Creates a new set of domain shares derived from the given functional redaction-based hierarchy.
      Parameters:
        `builder` -

  - ### Method Detail

    - #### clone

          public DomainShareRedaction clone()

      Description copied from interface: `DomainShare`
      Clones the share
      Specified by:
        `clone` in interface `DomainShare`
      Overrides:
        `clone` in class `java.lang.Object`
      Returns:

    - #### getDomainSize

          public double getDomainSize()

      Returns the size of the domain.
      Specified by:
        `getDomainSize` in interface `DomainShare`
      Returns:

    - #### getShare

          public double getShare(int value,
                        int level)

      Returns the share of the given value.
      Specified by:
        `getShare` in interface `DomainShare`
      Parameters:
        `value` -
        `level` -
      Returns: