Package uk.ac.starlink.ttools.task
Class Aggregators
java.lang.Object
uk.ac.starlink.ttools.task.Aggregators
Provides instances of the Aggregator interface.
- Since:
- 16 Nov 2022
- Author:
- Mark Taylor
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Aggregator
Aggregator that assembles an array of all non-blank inputs.static final Aggregator
Aggregator that assembles an array of all inputs.static final Aggregator
Aggregator for counting items, with int-valued counter.static final Aggregator
Aggregator for counting items, with long-valued counter.static final Aggregator
Aggregator that calculates the maximum.static final Aggregator
Aggregator that calculates the mean.static final Aggregator
Aggregator that calculates the median.static final Aggregator
Aggregator that calculates the minimum.static final Aggregator
Aggregator for counting non-blank items, with int-valued counter.static final Aggregator
Aggregator for counting non-blank items, with long-valued counter.static final Aggregator
Aggregator that calculates the population standard deviation.static final Aggregator
Aggregator that calculates the sample standard deviation.static final Aggregator
Aggregator for summing items. -
Method Summary
Modifier and TypeMethodDescriptionstatic Aggregator
getAggregator
(String aggTxt) Gets an aggregator instance from its name.static Aggregator[]
Returns an array of useful Aggregator instances.static String
Returns an XML element listing the possible options for specification of an Aggregator.
-
Field Details
-
COUNT
Aggregator for counting items, with int-valued counter. -
NGOOD
Aggregator for counting non-blank items, with int-valued counter. -
SUM
Aggregator for summing items. -
MEAN
Aggregator that calculates the mean. -
MEDIAN
Aggregator that calculates the median. -
SAMPLE_STDEV
Aggregator that calculates the sample standard deviation. -
POP_STDEV
Aggregator that calculates the population standard deviation. -
MAX
Aggregator that calculates the maximum. -
MIN
Aggregator that calculates the minimum. -
ARRAY_NOBLANKS
Aggregator that assembles an array of all non-blank inputs. -
ARRAY_WITHBLANKS
Aggregator that assembles an array of all inputs. -
COUNT_LONG
Aggregator for counting items, with long-valued counter. -
NGOOD_LONG
Aggregator for counting non-blank items, with long-valued counter.
-
-
Method Details
-
getAggregators
Returns an array of useful Aggregator instances.- Returns:
- aggregator array
-
getAggregator
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
Returns an XML element listing the possible options for specification of an Aggregator. This corresponds to the suitable inputs for thegetAggregator(String)
method.- Returns:
- options description in as a <ul> element
-