@ Override public void setRoundingMode ( int roundingMode ) { if ( roundingMode < BigDecimal . ROUND_UP || roundingMode > BigDecimal . ROUND_UNNECESSARY ) { throw new IllegalArgumentException ( "Invalid rounding mode: " + roundingMode ) ; } this . roundingMode = roundingMode ; resetActualRounding ( ) ; }
Sets the rounding mode . This has no effect unless the rounding increment is greater than zero .