# Class TableGroup.AggSpec

java.lang.Object
uk.ac.starlink.ttools.task.TableGroup.AggSpec

Enclosing class:
  `TableGroup`

public static class TableGroup.AggSpec extends Object
Defines the aggregation that should be done to form an output column.

Since:
  17 Nov 2022
Author:
  Mark Taylor

## Constructor Summary

Constructors
Constructor
Description
`AggSpec(String expr, Aggregator aggregator, String outName)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`Aggregator`
`getAggregator()`
Returns the aggregation method.
`String`
`getExpression()`
Returns an expression giving the quantity to be aggregated.
`String`
`getOutputName()`
Returns the output column name, if specified.

### Methods inherited from class Object

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

## Constructor Details

### AggSpec

public AggSpec(String expr, Aggregator aggregator, String outName)
Constructor.

Parameters:
  `expr` - expression giving quantity to be aggregated
  `aggregator` - aggregation method
  `outName` - output column name, or null for default

## Method Details

### getExpression

public String getExpression()
Returns an expression giving the quantity to be aggregated.

Returns:
  JEL expression or column name

### getAggregator

public Aggregator getAggregator()
Returns the aggregation method.

Returns:
  aggregator

### getOutputName

public String getOutputName()
Returns the output column name, if specified.

Returns:
  user-specified output column name, or null