# Class Aggregators

java.lang.Object
uk.ac.starlink.ttools.task.Aggregators

public class Aggregators extends Object
Provides instances of the Aggregator interface.

Since:
  16 Nov 2022
Author:
  Mark Taylor

## Field Summary

Fields
Modifier and Type
Field
Description
`static final Aggregator`
`ARRAY_NOBLANKS`
Aggregator that assembles an array of all non-blank inputs.
`static final Aggregator`
`ARRAY_WITHBLANKS`
Aggregator that assembles an array of all inputs.
`static final Aggregator`
`COUNT`
Aggregator for counting items, with int-valued counter.
`static final Aggregator`
`COUNT_LONG`
Aggregator for counting items, with long-valued counter.
`static final Aggregator`
`MAX`
Aggregator that calculates the maximum.
`static final Aggregator`
`MEAN`
Aggregator that calculates the mean.
`static final Aggregator`
`MEDIAN`
Aggregator that calculates the median.
`static final Aggregator`
`MIN`
Aggregator that calculates the minimum.
`static final Aggregator`
`NGOOD`
Aggregator for counting non-blank items, with int-valued counter.
`static final Aggregator`
`NGOOD_LONG`
Aggregator for counting non-blank items, with long-valued counter.
`static final Aggregator`
`POP_STDEV`
Aggregator that calculates the population standard deviation.
`static final Aggregator`
`SAMPLE_STDEV`
Aggregator that calculates the sample standard deviation.
`static final Aggregator`
`SUM`
Aggregator for summing items.

## Method Summary

Modifier and Type
Method
Description
`static Aggregator`
`getAggregator(String aggTxt)`
Gets an aggregator instance from its name.
`static Aggregator[]`
`getAggregators()`
Returns an array of useful Aggregator instances.
`static String`
`getOptionsDescription()`
Returns an XML element listing the possible options for specification of an Aggregator.

### Methods inherited from class Object

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

## Field Details

### COUNT

public static final Aggregator COUNT
Aggregator for counting items, with int-valued counter.

### NGOOD

public static final Aggregator NGOOD
Aggregator for counting non-blank items, with int-valued counter.

### SUM

public static final Aggregator SUM
Aggregator for summing items.

### MEAN

public static final Aggregator MEAN
Aggregator that calculates the mean.

### MEDIAN

public static final Aggregator MEDIAN
Aggregator that calculates the median.

### SAMPLE_STDEV

public static final Aggregator SAMPLE_STDEV
Aggregator that calculates the sample standard deviation.

### POP_STDEV

public static final Aggregator POP_STDEV
Aggregator that calculates the population standard deviation.

### MAX

public static final Aggregator MAX
Aggregator that calculates the maximum.

### MIN

public static final Aggregator MIN
Aggregator that calculates the minimum.

### ARRAY_NOBLANKS

public static final Aggregator ARRAY_NOBLANKS
Aggregator that assembles an array of all non-blank inputs.

### ARRAY_WITHBLANKS

public static final Aggregator ARRAY_WITHBLANKS
Aggregator that assembles an array of all inputs.

### COUNT_LONG

public static final Aggregator COUNT_LONG
Aggregator for counting items, with long-valued counter.

### NGOOD_LONG

public static final Aggregator NGOOD_LONG
Aggregator for counting non-blank items, with long-valued counter.

## Method Details

### getAggregators

public static Aggregator[] getAggregators()
Returns an array of useful Aggregator instances.

Returns:
  aggregator array

### getAggregator

public static Aggregator getAggregator(String aggTxt)
Gets an aggregator instance from its name.

Parameters:
  `aggTxt` - string specification of aggregator
Returns:
  aggregator, or null if nothing can be made of it

### getOptionsDescription

public static String getOptionsDescription()
Returns an XML element listing the possible options for specification of an Aggregator. This corresponds to the suitable inputs for the `getAggregator(String)` method.

Returns:
  options description in as a <ul> element