# HierarchyBuilderGroupingBased.Level (ARX GUI Documentation)

org.deidentifier.arx.aggregates

## Class HierarchyBuilderGroupingBased.Level<U>

- java.lang.Object
- - org.deidentifier.arx.aggregates.HierarchyBuilderGroupingBased.Level<U>

- Type Parameters:
    `U` -
  All Implemented Interfaces:
    java.io.Serializable
  Enclosing class:
    HierarchyBuilderGroupingBased<T>

      public static class HierarchyBuilderGroupingBased.Level<U>
      extends java.lang.Object
      implements java.io.Serializable

  This class represents a level in the hierarchy.
  See Also:
    Serialized Form

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `HierarchyBuilderGroupingBased.Level<U>` | `addGroup(int size)` Adds the given group with the default aggregate function.
    `HierarchyBuilderGroupingBased.Level<U>` | `addGroup(int size, AggregateFunction<U> function)` Adds the given group with the given aggregate function.
    `HierarchyBuilderGroupingBased.Level<U>` | `addGroup(int size, java.lang.String label)` Adds the given group.
    `HierarchyBuilderGroupingBased.Level<U>` | `clearGroups()` Removes all groups on this level.
    `java.util.List<HierarchyBuilderGroupingBased.Group<U>>` | `getGroups()` Returns the list.
    `int` | `getLevel()`
    `java.lang.String` | `toString()`

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

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

- - ### Method Detail

    - #### addGroup

          public HierarchyBuilderGroupingBased.Level<U> addGroup(int size)

      Adds the given group with the default aggregate function.
      Parameters:
        `size` -
      Returns:

    - #### addGroup

          public HierarchyBuilderGroupingBased.Level<U> addGroup(int size,
                                                        AggregateFunction<U> function)

      Adds the given group with the given aggregate function.
      Parameters:
        `size` -
        `function` -
      Returns:

    - #### addGroup

          public HierarchyBuilderGroupingBased.Level<U> addGroup(int size,
                                                        java.lang.String label)

      Adds the given group. The result will be labeled with the given string
      Parameters:
        `size` -
        `label` -
      Returns:

    - #### clearGroups

          public HierarchyBuilderGroupingBased.Level<U> clearGroups()

      Removes all groups on this level.
      Returns:

    - #### getGroups

          public java.util.List<HierarchyBuilderGroupingBased.Group<U>> getGroups()

      Returns the list.
      Returns:

    - #### getLevel

          public int getLevel()

      Returns:
        the level

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`