Java BigDecimal from toBigDecimal(String value)

Here you can find the source of toBigDecimal(String value)

Description

to Big Decimal

License

Open Source License

Declaration

public static BigDecimal toBigDecimal(String value) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.math.BigDecimal;

public class Main {
    public static BigDecimal toBigDecimal(String value) {
        if (null == value) {
            return null;
        }/*  ww w  . j a va2s  .  co  m*/
        value = value.trim();
        if ("null".equals(value)) {
            return null;
        }
        return new BigDecimal(value);
    }

    public static BigDecimal toBigDecimal(Object value) {
        if (null == value) {
            return null;
        }
        return toBigDecimal(String.valueOf(value));
    }
}

Related

  1. toBigDecimal(String s)
  2. toBigDecimal(String s, int scale)
  3. toBigDecimal(String str)
  4. toBigDecimal(String value)
  5. toBigDecimal(String value)
  6. toBigDecimal(String value)
  7. toBigDecimal(T value)
  8. toBigDecimal(Vector doubleVector)
  9. toBigDecimalArray(int[] ints)