Java Utililty Methods BigDecimal from

List of utility methods to do BigDecimal from

Description

The list of methods to do BigDecimal from are organized into topic(s).

Method

BigDecimal[]toBigDecimalArray(int[] ints)
to Big Decimal Array
BigDecimal[] result = new BigDecimal[ints.length];
for (int i = 0; i < ints.length; i++) {
    result[i] = new BigDecimal(ints[i]);
return result;
ListtoBigDecimalList(double... list)
Returns a list of BigDecimal based on a list of doubles.
List<BigDecimal> result = new ArrayList<BigDecimal>(list.length);
for (int i = 0; i < list.length; i++) {
    result.add(BigDecimal.valueOf(list[i]));
return result;
ListtoBigDecimalList(List list)
Converts a list of integers to a list of BigDecimals.
List<BigDecimal> bigDecimalList = new ArrayList<BigDecimal>();
for (Integer val : list) {
    bigDecimalList.add(new BigDecimal(val));
return bigDecimalList;
BigIntegertoBigInteger(@Nullable final BigDecimal value)
to Big Integer
return (value == null ? null : value.toBigInteger());
StringtoBigIntString(final BigDecimal bigD)
to Big Int String
return bigD.setScale(0, RoundingMode.HALF_UP).toBigInteger().toString();