Java BigDecimal Parse parseBigDecimal(Object obj)

Here you can find the source of parseBigDecimal(Object obj)

Description

parse Big Decimal

License

Apache License

Declaration

public static BigDecimal parseBigDecimal(Object obj) 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.math.BigDecimal;

public class Main {
    public static BigDecimal parseBigDecimal(Object obj) {
        BigDecimal value = BigDecimal.ZERO;
        if (obj != null) {
            try {
                value = new BigDecimal(obj.toString());
            } catch (Exception var3) {
                value = BigDecimal.ZERO;
            }//from   w w  w.  j  av a2s .co m
        }

        return value;
    }
}

Related

  1. isInteger(BigDecimal decimal)
  2. isInteger(BigDecimal inValue)
  3. isIntegerBigDecimal(BigDecimal bd)
  4. isIntegerValue(final BigDecimal bd)
  5. parseBigDecimal(Object o, BigDecimal defaulti)
  6. parseBigDecimal(Object value)
  7. parseBigDecimal(Object value)
  8. parseBigDecimal(String data)
  9. parseBigDecimal(String inString, BigDecimal inDefault)