class NumberFieldActions implements AtlasFieldAction {

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

        Number quotient = null;
        for (Object entry : inputs) {
            if (entry instanceof Number) {
                if (quotient == null) {
                    quotient = (Number) entry;
                } else if (quotient instanceof BigDecimal) {
                    quotient = ((BigDecimal) quotient).divide(BigDecimal.valueOf(((Number) entry).doubleValue()));
                } else if (entry instanceof BigDecimal) {
                    quotient = BigDecimal.valueOf(quotient.doubleValue()).divide((BigDecimal) entry);
                } else {
                    quotient = quotient.doubleValue() / ((Number) entry).doubleValue();
                }
            } else {
                warnIgnoringValue("Divide", entry);
            }
        }

        return quotient;
    }

}