List<FeatureCalc> visitors = new ArrayList<FeatureCalc>();
for (AggregationFunction function : functionList) {
FeatureCalc calc;
if (function == AggregationFunction.Average) {
calc = new AverageVisitor(attIndex, features.getSchema());
} else if (function == AggregationFunction.Count) {
calc = new CountVisitor();
} else if (function == AggregationFunction.Max) {
calc = new MaxVisitor(attIndex, features.getSchema());
} else if (function == AggregationFunction.Median) {