List of utility methods to do BigDecimal from
BigDecimal | numberToBigDecimal(Number number) Converts the given number to a BigDecimal. return number == null ? null : new BigDecimal(number.toString()); |
BigDecimal | numberToBigDecimal(Number value) number To Big Decimal if (isAFloatingPointNumber(value)) { return new BigDecimal(value.doubleValue()); } else { return new BigDecimal(value.longValue()); |
BigDecimal | numberToBigDecimal(Object number) number To Big Decimal if (number == null) { return null; if (!(number instanceof Number)) { throw new IllegalArgumentException("Input object is not a number"); return new BigDecimal(((Number) number).toString()); |
BigDecimal | numberToBigDecimal(Object obj) number To Big Decimal return obj instanceof Number ? newBigDecimal(obj) : null; |
BigDecimal | toBigDecimal(byte[] bytes) Converts a byte array to a BigDecimal return toBigDecimal(bytes, 0, bytes.length);
|
BigDecimal | toBigDecimal(Double d) Converts a Double to a BigDecimal. if (d == null) { return null; return BigDecimal.valueOf(d); |
BigDecimal | toBigDecimal(Double d) convert to bigdecimal. BigDecimal bd = null; if (null != d) { bd = new BigDecimal(d); return bd; |
BigDecimal | toBigDecimal(double val) to Big Decimal assert !Double.isNaN(val); assert !Double.isInfinite(val); return new BigDecimal(Double.toString(val)); |
BigDecimal[][] | toBigDecimal(double[][] a) to Big Decimal int n = a.length; BigDecimal[][] b = new BigDecimal[n][n]; for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) { b[i][j] = BigDecimal.valueOf(a[i][j]); return b; ... |
BigDecimal | toBigDecimal(final byte value) to Big Decimal return BigDecimal.valueOf(value);
|