public final enum

RoundingMode

extends Enum<E extends Enum<E>>
java.lang.Object
   ↳ java.lang.Enum<E extends java.lang.Enum<E>>
     ↳ java.math.RoundingMode

Class Overview

Specifies the rounding behavior for operations whose results cannot be represented exactly.

Summary

Public Methods
static RoundingMode valueOf(int mode)
Converts rounding mode constants from class BigDecimal into RoundingMode values.
static RoundingMode valueOf(String name)
final static RoundingMode[] values()
[Expand]
Inherited Methods
From class java.lang.Enum
From class java.lang.Object
From interface java.lang.Comparable

Public Methods

public static RoundingMode valueOf (int mode)

Since: API Level 1

Converts rounding mode constants from class BigDecimal into RoundingMode values.

Parameters
mode rounding mode constant as defined in class BigDecimal
Returns
  • corresponding rounding mode object

public static RoundingMode valueOf (String name)

Since: API Level 1

public static final RoundingMode[] values ()

Since: API Level 1