
step.artefacts.Aggregator Maven / Gradle / Ivy
package step.artefacts;
import java.util.function.Function;
public enum Aggregator {
AVG(Aggregation::getAvg, "Average"),
MAX(Aggregation::getMax, "Max"),
MIN(Aggregation::getMin, "Min"),
COUNT(Aggregation::getCount, "Count"),
SUM(Aggregation::getSum, "Sum");
private Function valueFunction;
private String description;
private Aggregator(Function supplier, String description) {
this.valueFunction = supplier;
this.description = description;
}
public Function getValueFunction() {
return valueFunction;
}
public String getDescription() {
return description;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy