Java BigDecimal Trim truncateAmount(BigDecimal value)

Here you can find the source of truncateAmount(BigDecimal value)

Description

truncate Amount

License

Open Source License

Declaration

@Deprecated
public static BigDecimal truncateAmount(BigDecimal value) 

Method Source Code

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

import java.math.BigDecimal;
import java.math.RoundingMode;

public class Main {
    /**/* ww w . ja va 2  s  .co  m*/
     * @deprecated scales of BTCCNY, LTCCNY, LTCBTC are different.
     */
    @Deprecated
    public static BigDecimal truncateAmount(BigDecimal value) {
        return value.setScale(3, RoundingMode.FLOOR).stripTrailingZeros();
    }
}

Related

  1. trim(BigDecimal n)
  2. trim(BigDecimal pNombre)
  3. trim(BigDecimal val)
  4. trimBigDecimal(BigDecimal n)
  5. truncByScale(BigDecimal value, int scale)