# DomainShareInterval (ARX Developer Documentation)

org.deidentifier.arx.metric.v2

## Class DomainShareInterval<T>

- java.lang.Object
- - org.deidentifier.arx.aggregates.HierarchyBuilder<T>
  - - org.deidentifier.arx.aggregates.HierarchyBuilderGroupingBased<T>
    - - org.deidentifier.arx.aggregates.HierarchyBuilderIntervalBased<T>
      - - org.deidentifier.arx.metric.v2.DomainShareInterval<T>

- Type Parameters:
    `T` -
  All Implemented Interfaces:
    java.io.Serializable, DomainShare

      public class DomainShareInterval<T>
      extends HierarchyBuilderIntervalBased<T>
      implements DomainShare

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

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.deidentifier.arx.aggregates.HierarchyBuilderIntervalBased

      `HierarchyBuilderIntervalBased.IndexNode, HierarchyBuilderIntervalBased.Interval<T>, HierarchyBuilderIntervalBased.Range<U>`

    - ### Nested classes/interfaces inherited from class org.deidentifier.arx.aggregates.HierarchyBuilderGroupingBased

      `HierarchyBuilderGroupingBased.AbstractGroup, HierarchyBuilderGroupingBased.Group<U>, HierarchyBuilderGroupingBased.Level<U>`

    - ### Nested classes/interfaces inherited from class org.deidentifier.arx.aggregates.HierarchyBuilder

      `HierarchyBuilder.Type`

  - ### Field Summary

    - ### Fields inherited from class org.deidentifier.arx.aggregates.HierarchyBuilderGroupingBased

      `function`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DomainShareInterval(HierarchyBuilderIntervalBased<T> builder, int[][] hierarchy, java.lang.String[] dictionary)` Creates a new set of domain shares derived from the given functional interval-based hierarchy.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `DomainShareInterval<T>` | `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 org.deidentifier.arx.aggregates.HierarchyBuilderIntervalBased

      `addInterval, addInterval, addInterval, addInterval, clearIntervals, create, create, create, create, getAdjustedRanges, getIntervals, getLowerRange, getUpperRange, isValid, prepareGroups, setData, setLevels`

    - ### Methods inherited from class org.deidentifier.arx.aggregates.HierarchyBuilderGroupingBased

      `build, build, getData, getDataType, getDefaultFunction, getLevel, getLevels, getPreparedGroups, prepare, setAggregateFunction, setPrepared`

    - ### Methods inherited from class org.deidentifier.arx.aggregates.HierarchyBuilder

      `getType, save, save`

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

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

- - ### Constructor Detail

    - #### DomainShareInterval

          public DomainShareInterval(HierarchyBuilderIntervalBased<T> builder,
                             int[][] hierarchy,
                             java.lang.String[] dictionary)

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

  - ### Method Detail

    - #### clone

          public DomainShareInterval<T> 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: