public void visit(Feature feature) { for (FeatureCalc delegate : delegates) { delegate.visit(feature); } } }
/** * Add a feature to the appropriate group by feature collection. * * @param feature the feature to be indexed */ void index(SimpleFeature feature) { // list of group by attributes values List<Object> groupByValues = groupByAttributes .stream() .map(expression -> expression.evaluate(feature)) .collect(Collectors.toList()); // check if a feature collection already for the group by values (using a list // feature collection to allow duplicates) FeatureCalc calc = groupByIndexes.get(groupByValues); if (calc == null) { calc = aggregate.create(expression); groupByIndexes.put(groupByValues, calc); } calc.visit(feature); }
public void visit(Feature feature) { for (FeatureCalc delegate : delegates) { delegate.visit(feature); } } }