Here you can find the source of scale2(BigDecimal valor)
Parameter | Description |
---|---|
valor | a parameter |
public static BigDecimal scale2(BigDecimal valor)
//package com.java2s; //License from project: Open Source License import java.math.BigDecimal; import java.math.RoundingMode; public class Main { /**/*from w w w. j a va2 s. co m*/ * Retorna valor com scale = 2 e RoundingMode.FLOOR * @param valor * @return */ public static BigDecimal scale2(BigDecimal valor) { if (null != valor) return valor.setScale(2, RoundingMode.FLOOR); else return valor; } }