use of java.lang.Object in project dhis2-core by dhis2.
the class MaxValue method run.
// nFunk's JEP run() method uses the raw Stack type
@SuppressWarnings({ "rawtypes", "unchecked" })
public void run(Stack inStack) throws ParseException {
checkStack(inStack);
Object param = inStack.pop();
List<Double> vals = CustomFunctions.checkVector(param);
Double max = null;
for (Double v : vals) {
if (max == null) {
max = v;
} else if (v > max) {
max = v;
}
}
inStack.push(new Double(max));
}
Aggregations