Here you can find the source of toBigDecimal(String value)
Parameter | Description |
---|---|
value | String value to be converted |
public static BigDecimal toBigDecimal(String value)
//package com.java2s; //License from project: Apache License import java.math.BigDecimal; public class Main { /**/* ww w.j a v a 2 s .co m*/ * Converts {@link java.lang.String} to {@link java.math.BigDecimal} * @param value String value to be converted * @return converted BigDecimal */ public static BigDecimal toBigDecimal(String value) { return BigDecimal.valueOf(toDouble(value)); } /** * Converts {@link java.lang.String} to {@link java.lang.Double} * @param value String value to be converted * @return converted Double */ public static Double toDouble(String value) { return Double.parseDouble(value); } }