protected BigDecimal processParsedValue(Number value, DecimalFormat formatter) {
        BigDecimal decimal;
        if (value instanceof Long) {
            decimal = BigDecimal.valueOf((Long) value);
        }
        else {
            decimal = new BigDecimal(value.toString());
        }

        int scale = determineScale(formatter);
        if (scale >= 0) {
            decimal = decimal.setScale(scale, RoundingMode.DOWN);
        }

        return decimal;
    }
Convert the parsed value to a <code>BigDecimal</code>.

@param value The parsed <code>Number</code> object created.
@param formatter The Format used to parse the value with.
@return The parsed <code>Number</code> converted to a <code>BigDecimal</code>.
primefaces/src/main/java/org/primefaces/util/BigDecimalValidator.java