Java BigDecimal milliToDollar(BigDecimal val)

Here you can find the source of milliToDollar(BigDecimal val)

Description

milli To Dollar

License

Open Source License

Declaration

public static String milliToDollar(BigDecimal val) 

Method Source Code


//package com.java2s;
import java.math.BigDecimal;

public class Main {
    private final static BigDecimal THOUSAND = new BigDecimal(1000);

    public static String milliToDollar(BigDecimal val) {
        return milliToDollar(val, 0);
    }/*w  w  w.j a  va 2s . c om*/

    public static String milliToDollar(BigDecimal val, int scale) {
        return val.divide(THOUSAND, scale, BigDecimal.ROUND_HALF_UP).toPlainString();
    }
}

Related

  1. limitScale(BigDecimal value, int scale)
  2. matchScale(BigDecimal[] val)
  3. mean(List numbers, MathContext context)
  4. median(final BigDecimal[] bigDecimalNumbers)
  5. milliToCent(BigDecimal val)
  6. mod(long res, BigDecimal value)
  7. movePoint(final BigDecimal v1, final int shift)
  8. moveRight(BigDecimal value, int offset)
  9. nullSafeCompare(BigDecimal pPremierNombre, BigDecimal pSecondNombre)