Interface Aggregator<T>
- All Known Implementing Classes:
Aggregators.BooleanMajority, Aggregators.Collect, Aggregators.Concatenate, Aggregators.ConcatenateUnique, Aggregators.Count, Aggregators.DateMax, Aggregators.DateMean, Aggregators.DateMedian, Aggregators.DateMin, Aggregators.DoubleMax, Aggregators.DoubleMean, Aggregators.DoubleMedian, Aggregators.DoubleMin, Aggregators.DoubleSum, Aggregators.IntMax, Aggregators.IntMean, Aggregators.IntMedian, Aggregators.IntMin, Aggregators.IntSum, Aggregators.LongMax, Aggregators.LongMean, Aggregators.LongMedian, Aggregators.LongMin, Aggregators.LongSum, Aggregators.StringMajority, Aggregators.StringMax, Aggregators.StringMin, Aggregators.Union
public interface Aggregator<T>
An aggregator accumulate individual values with addValue method and
return a synthetic value with getResult method.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a new value to the aggregator.Aggregator<?> clone()Create a new Aggregator with the same attributes as this one.getName()Returns the name of this Aggregator.getParameter(String name) Returns parameter value for name parameter.Return parameter names used by this aggregatorbooleanReturns true if this aggregator must ignore null values.voidreset()Reset the aggregator (clear the list of values)voidsetIgnoreNull(boolean ignoreNull) Change the way this aggregator process null values.voidsetParameter(String name, Object value) Set a parameter value for this aggregator.
-
Field Details
-
SEPARATOR_NAME
- See Also:
-
-
Method Details
-
clone
Aggregator<?> clone()Create a new Aggregator with the same attributes as this one. -
ignoreNull
boolean ignoreNull()Returns true if this aggregator must ignore null values. -
setIgnoreNull
void setIgnoreNull(boolean ignoreNull) Change the way this aggregator process null values. -
getParameters
-
setParameter
-
getParameter
-
getName
String getName()Returns the name of this Aggregator. -
getOutputAttributeType
AttributeType getOutputAttributeType()- Returns:
- the AttributeType of the aggregated value.
-
addValue
-
getValues
-
getResult
Object getResult()- Returns:
- the aggregated value.
-
reset
void reset()Reset the aggregator (clear the list of values)
-