Here you can find the source of truncByScale(BigDecimal value, int scale)
public static BigDecimal truncByScale(BigDecimal value, int scale)
//package com.java2s; //License from project: Apache License import java.math.BigDecimal; public class Main { public static BigDecimal truncByScale(BigDecimal value, int scale) { return value.setScale(scale, BigDecimal.ROUND_DOWN); }//from w w w . j a v a2 s . co m }