private BigDecimal parseNumber(final NumberBuffer buffer) {
        BigDecimal sum = BigDecimal.ZERO;
        BigDecimal result = parseLargePair(buffer);

        if (result == null) {
            return null;
        }

        while (result != null) {
            sum = sum.add(result);
            result = parseLargePair(buffer);
        }

        return sum;
    }
private BigDecimal parseNumber ( final NumberBuffer buffer ) { BigDecimal sum = BigDecimal . ZERO ; BigDecimal result = parseLargePair ( buffer ) ; if ( result == null ) { return null ; } while ( result != null ) { sum = sum . add ( result ) ; result = parseLargePair ( buffer ) ; } return sum ; }
Parses a Japanese number

@param buffer buffer to parse
@return parsed number, or null on error or end of input