@Test public void testFeatureAttributeVisitor() { GroupByVisitor visitor = buildVisitor("energy_consumption", "Average", new String[] {"building_type"}); List<Expression> expressions = visitor.getExpressions(); Set<String> names = new HashSet<>(); for (Expression expression : expressions) { PropertyName pn = (PropertyName) expression; names.add(pn.getPropertyName()); } assertEquals(2, names.size()); assertTrue(names.contains("energy_consumption")); assertTrue(names.contains("building_type")); }
@Override public List<Expression> getExpressions() { List<Expression> result = new ArrayList<>(groupByAttributes); result.add(expression); return result; }
GroupByVisitor implements FeatureCalc, FeatureAttributeVisitor { @Override public List<Expression> getExpressions() { List<Expression> result = new ArrayList<>(groupByAttributes); result.add(expression); return result; } }
GroupByVisitor implements FeatureCalc, FeatureAttributeVisitor { @Override public List<Expression> getExpressions() { List<Expression> result = new ArrayList<>(groupByAttributes); result.add(expression); return result; } GroupByVisitor(
            Aggregate aggregateVisitor,
            Expression expression,
            List<Expression> groupByAttributes,
            ProgressListener progressListener); }
GroupByVisitor implements FeatureCalc, FeatureAttributeVisitor { @Override public List<Expression> getExpressions() { List<Expression> result = new ArrayList<>(groupByAttributes); result.add(expression); return result; } GroupByVisitor(
            Aggregate aggregateVisitor,
            Expression expression,
            List<Expression> groupByAttributes,
            ProgressListener progressListener); boolean wasOptimized(); boolean wasVisited(); @Override CalcResult getResult(); @Override void visit(Feature feature); Expression getExpression(); FeatureVisitor getAggregateVisitor(); List<Expression> getGroupByAttributes(); void setValue(List<GroupByRawResult> value); @Override List<Expression> getExpressions(); @Override Optional<List<Class>> getResultType(List<Class> inputTypes); }
GroupByVisitor implements FeatureCalc, FeatureAttributeVisitor { @Override public List<Expression> getExpressions() { List<Expression> result = new ArrayList<>(groupByAttributes); result.add(expression); return result; } GroupByVisitor(
            Aggregate aggregateVisitor,
            Expression expression,
            List<Expression> groupByAttributes,
            ProgressListener progressListener); boolean wasOptimized(); boolean wasVisited(); @Override CalcResult getResult(); @Override void visit(Feature feature); Expression getExpression(); FeatureVisitor getAggregateVisitor(); List<Expression> getGroupByAttributes(); void setValue(List<GroupByRawResult> value); @Override List<Expression> getExpressions(); @Override Optional<List<Class>> getResultType(List<Class> inputTypes);  }