for (Object value : values) {
result.add(((Number) value).doubleValue());
}
}
} else {
final MinVisitor min = new MinVisitor(elevation.getAttribute());
collection.accepts(min, null);
// check calcresult first to avoid potential IllegalStateException if no features are in collection
CalcResult calcResult = min.getResult();
if (calcResult != CalcResult.NULL_RESULT) {
result.add(((Number) min.getMin()).doubleValue());
final MaxVisitor max = new MaxVisitor(elevation.getAttribute());
collection.accepts(max, null);
result.add(((Number) max.getMax()).doubleValue());
}
}