Java java.math RoundingMode fields, constructors, methods, implement or subclass

Example usage for Java java.math RoundingMode fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for java.math RoundingMode.

The text is from its open source code.

Field

RoundingModeUP
Rounding mode to round away from zero.
RoundingModeDOWN
Rounding mode to round towards zero.
RoundingModeCEILING
Rounding mode to round towards positive infinity.
RoundingModeFLOOR
Rounding mode to round towards negative infinity.
RoundingModeHALF_UP
Rounding mode to round towards "nearest neighbor" unless both neighbors are equidistant, in which case round up.
RoundingModeHALF_DOWN
Rounding mode to round towards "nearest neighbor" unless both neighbors are equidistant, in which case round down.
RoundingModeHALF_EVEN
Rounding mode to round towards the "nearest neighbor" unless both neighbors are equidistant, in which case, round towards the even neighbor.
RoundingModeUNNECESSARY
Rounding mode to assert that the requested operation has an exact result, hence no rounding is necessary.

Method

StringtoString()
Returns a string representation of the object.
RoundingModevalueOf(int rm)
Returns the RoundingMode object corresponding to a legacy integer rounding mode constant in BigDecimal .