org.deidentifier.arx.gui.view.impl.wizard

## Class HierarchyWizardModelGrouping<T>

- java.lang.Object
- - org.deidentifier.arx.gui.view.impl.wizard.HierarchyWizardModelAbstract<T>
  - - org.deidentifier.arx.gui.view.impl.wizard.HierarchyWizardModelGrouping<T>

Type Parameters:
  `T` -

Direct Known Subclasses:
  HierarchyWizardModelIntervals, HierarchyWizardModelOrder

    public abstract class HierarchyWizardModelGrouping<T>
    extends HierarchyWizardModelAbstract<T>

A base-class for grouping-based builders, i.e., order-based and interval-based builders

Author:
  Fabian Prasser

### Nested Class Summary

Nested Classes
`static class` `HierarchyWizardModelGrouping.HierarchyWizardGroupingGroup<U>` This class represents a group.
`static class` `HierarchyWizardModelGrouping.HierarchyWizardGroupingInterval<U>` This class represents an interval.
`static class` `HierarchyWizardModelGrouping.HierarchyWizardGroupingRange<U>` This class represents an adjustment.

### Constructor Summary

Constructors
Constructor and Description
`HierarchyWizardModelGrouping(java.lang.String[] data, DataType<T> type, boolean intervals)` Creates a new instance.

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `addAfter(java.lang.Object selected)` Adds an element after the given one.
`void` `addBefore(java.lang.Object selected)` Adds an element before the given one.
`void` `addRight(java.lang.Object selected)` Adds a column.
`DataType<T>` `getDataType()`
`AggregateFunction<T>` `getDefaultFunction()` Returns the default aggregate function.
`java.util.List<HierarchyWizardModelGrouping.HierarchyWizardGroupingInterval<T>>` `getIntervals()`
`HierarchyWizardModelGrouping.HierarchyWizardGroupingRange<T>` `getLowerRange()`
`java.util.List<java.util.List<HierarchyWizardModelGrouping.HierarchyWizardGroupingGroup<T>>>` `getModelGroups()`
`HierarchyWizardEditorRenderer<T>` `getRenderer()`
`java.lang.Object` `getSelectedElement()`
`HierarchyWizardModelGrouping.HierarchyWizardGroupingRange<T>` `getUpperRange()`
`boolean` `isFirst(HierarchyWizardModelGrouping.HierarchyWizardGroupingInterval<T> interval)` Is this the first interval.
`boolean` `isLast(HierarchyWizardModelGrouping.HierarchyWizardGroupingInterval<T> interval)` Is this the last interval.
`boolean` `isShowIntervals()`
`void` `mergeDown(java.lang.Object selected)` Merges the interval down.
`void` `mergeUp(java.lang.Object selected)` Merges the interval up.
`void` `parse(HierarchyBuilderIntervalBased<T> builder)` Parses an interval-based spec.
`void` `parse(HierarchyBuilderOrderBased<T> builder)` Parses an order-based spec.
`void` `register(HierarchyWizard.HierarchyWizardView component)` Registers a part of the UI.
`void` `remove(java.lang.Object selected)` Removes the given object.
`void` `setDefaultFunction(AggregateFunction<T> function)` Sets the default aggregate function.
`void` `setSelectedElement(java.lang.Object selected)` Updates the selected element.
`void` `update()` Update the model and all UI components.
`void` `update(HierarchyWizard.HierarchyWizardView sender)` Update the model and all UI components, apart from the sender.
`void` `updateUI(HierarchyWizard.HierarchyWizardView sender)` Update the UI components.

### Methods inherited from class org.deidentifier.arx.gui.view.impl.wizard.HierarchyWizardModelAbstract

`getBuilder, getData, getError, getGroups, getHierarchy, parse, setView`

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

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

### Constructor Detail

#### HierarchyWizardModelGrouping

    public HierarchyWizardModelGrouping(java.lang.String[] data,
                                        DataType<T> type,
                                        boolean intervals)

Creates a new instance.

Parameters:
  `data` -
  `type` -
  `intervals` -

### Method Detail

#### addAfter

    public void addAfter(java.lang.Object selected)

Adds an element after the given one.

Parameters:
  `selected` -

#### addBefore

    public void addBefore(java.lang.Object selected)

Adds an element before the given one.

Parameters:
  `selected` -

#### addRight

    public void addRight(java.lang.Object selected)

Adds a column.

Parameters:
  `selected` -

#### getDataType

    public DataType<T> getDataType()

Returns:
  the type

#### getDefaultFunction

    public AggregateFunction<T> getDefaultFunction()

Returns the default aggregate function.

Returns:

#### getIntervals

    public java.util.List<HierarchyWizardModelGrouping.HierarchyWizardGroupingInterval<T>> getIntervals()

Returns:
  the intervals

#### getLowerRange

    public HierarchyWizardModelGrouping.HierarchyWizardGroupingRange<T> getLowerRange()

Returns:
  the lower

#### getModelGroups

    public java.util.List<java.util.List<HierarchyWizardModelGrouping.HierarchyWizardGroupingGroup<T>>> getModelGroups()

Returns:
  the groups

#### getRenderer

    public HierarchyWizardEditorRenderer<T> getRenderer()

Returns:
  the renderer

#### getSelectedElement

    public java.lang.Object getSelectedElement()

Returns:
  the selected

#### getUpperRange

    public HierarchyWizardModelGrouping.HierarchyWizardGroupingRange<T> getUpperRange()

Returns:
  the upper

#### isFirst

    public boolean isFirst(HierarchyWizardModelGrouping.HierarchyWizardGroupingInterval<T> interval)

Is this the first interval.

Parameters:
  `interval` -
Returns:

#### isLast

    public boolean isLast(HierarchyWizardModelGrouping.HierarchyWizardGroupingInterval<T> interval)

Is this the last interval.

Parameters:
  `interval` -
Returns:

#### isShowIntervals

    public boolean isShowIntervals()

Returns:
  the showIntervals

#### mergeDown

    public void mergeDown(java.lang.Object selected)

Merges the interval down.

Parameters:
  `selected` -

#### mergeUp

    public void mergeUp(java.lang.Object selected)

Merges the interval up.

Parameters:
  `selected` -

#### parse

    public void parse(HierarchyBuilderIntervalBased<T> builder)

Parses an interval-based spec.

Parameters:
  `builder` -

#### parse

    public void parse(HierarchyBuilderOrderBased<T> builder)
               throws java.lang.IllegalArgumentException

Parses an order-based spec.

Parameters:
  `builder` -
Throws:
  `java.lang.IllegalArgumentException`

#### register

    public void register(HierarchyWizard.HierarchyWizardView component)

Registers a part of the UI.

Parameters:
  `component` -

#### remove

    public void remove(java.lang.Object selected)

Removes the given object.

Parameters:
  `selected` -

#### setDefaultFunction

    public void setDefaultFunction(AggregateFunction<T> function)

Sets the default aggregate function.

Parameters:
  `function` -

#### setSelectedElement

    public void setSelectedElement(java.lang.Object selected)

Updates the selected element.

Parameters:
  `selected` -

#### update

    public void update()

Update the model and all UI components.

Overrides:
  `update` in class `HierarchyWizardModelAbstract<T>`

#### update

    public void update(HierarchyWizard.HierarchyWizardView sender)

Update the model and all UI components, apart from the sender.

Parameters:
  `sender` -

#### updateUI

    public void updateUI(HierarchyWizard.HierarchyWizardView sender)

Update the UI components.

Specified by:
  `updateUI` in class `HierarchyWizardModelAbstract<T>`