class NumberFieldActions implements AtlasFieldAction {

    @AtlasActionProcessor
    public static Number maximum(Maximum maximum, List<Number> inputs) {
        if (inputs == null) {
            return 0;
        }

        Number max = null;
        for (Object entry : inputs) {
            if (entry instanceof Number) {
                if (max instanceof BigDecimal && entry instanceof BigDecimal) {
                    max = ((BigDecimal) entry).max((BigDecimal)max);
                } else if (max == null || ((Number) entry).doubleValue() > max.doubleValue()) {
                    max = (Number) entry;
                }
            } else {
                warnIgnoringValue("Maximum", entry);
            }
        }

        return max;
    }

}