Examples of DecimalParseInfo


Examples of ariba.util.formatter.DecimalParseInfo

        @return Returns a Object representation of the <code>stringToParse</code>
    */
    public Object parseObject (String stringToParse) throws ParseException
    {
        Object bigDecimal = null;
        DecimalParseInfo decimalParseInfo = null;
        if ((stringToParse != null) && (stringToParse.length() > 0)) {
            decimalParseInfo = BigDecimalFormatter.parseBigDecimal(stringToParse, _decimalFormat);
            bigDecimal =  decimalParseInfo.number;
        }
        return bigDecimal;
View Full Code Here

Examples of ariba.util.formatter.DecimalParseInfo

        char lastChar = moneyString.charAt(moneyString.length() - 1);
        DecimalFormat fmt = getDecimalFormat(locale, true, true);
        char decimalSeparator = fmt.getDecimalFormatSymbols().getDecimalSeparator();
        boolean moneyStringHasSuffix = !Character.isDigit(lastChar) &&
                                       lastChar != decimalSeparator;
        DecimalParseInfo info = parseMoneyNumber(moneyString, locale,
                                                 moneyStringHasSuffix);
        amount = info.number;
        prefix = info.prefix;
        if (moneyStringHasSuffix) {
            suffix = info.suffix;
View Full Code Here

Examples of ariba.util.formatter.DecimalParseInfo

                                    boolean insertingAfterDecimal,
                                    int     digitsToInsert)
    {
        try {
                // Get precision and scale info for money amounts
            DecimalParseInfo info = moneyInfo(moneyString);
            int scale = _currencyAdapter.getPrecision(_leadCurrency);
            int decimalDigits =
                (insertingAfterDecimal) ? (info.decimalDigits + digitsToInsert) : scale;
            int intDigits = info.integerDigits +
                (insertingAfterDecimal ? 0 : digitsToInsert);
View Full Code Here

Examples of ariba.util.formatter.DecimalParseInfo

        @aribaapi private
    */
    private DecimalParseInfo parseBigDecimal (String string, DecimalFormat fmt, Locale locale)
      throws ParseException
    {
        DecimalParseInfo info =
            BigDecimalFormatter.parseBigDecimal(string, fmt);

        /*
            If we find the euro prefix, then we'll set the suffix to be
            EUR as long as the user didn't type in another suffix value.
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.