Uses of Class
java.math.RoundingMode
-
Packages that use RoundingMode 软件包 描述 java.math 提供用于执行任意精度整数运算(BigInteger)和任意精度十进制算术(BigDecimal)的类。java.text 提供用于以独立于自然语言的方式处理文本,日期,数字和消息的类和接口。 -
-
Uses of RoundingMode in java.math
Methods in java.math that return RoundingMode 变量和类型 方法 描述 RoundingModeMathContext. getRoundingMode()返回roundingMode设置。static RoundingModeRoundingMode. valueOf(int rm)返回RoundingMode对应于遗留整数舍入模式恒定对象BigDecimal。static RoundingModeRoundingMode. valueOf(String name)返回具有指定名称的此类型的枚举常量。static RoundingMode[]RoundingMode. values()按照声明的顺序返回一个包含此枚举类型常量的数组。Methods in java.math with parameters of type RoundingMode 变量和类型 方法 描述 BigDecimalBigDecimal. divide(BigDecimal divisor, int scale, RoundingMode roundingMode)返回BigDecimal其值为(this / divisor),其比例为指定的比例。BigDecimalBigDecimal. divide(BigDecimal divisor, RoundingMode roundingMode)返回BigDecimal其值为(this / divisor),其比例为this.scale()。BigDecimalBigDecimal. setScale(int newScale, RoundingMode roundingMode)返回BigDecimal其标度为指定值,其未BigDecimal值通过将此BigDecimal值乘以或除以适当的10的幂来确定,以保持其总值。Constructors in java.math with parameters of type RoundingMode 构造器 描述 MathContext(int setPrecision, RoundingMode setRoundingMode)构造具有指定精度和舍入模式的新MathContext。 -
Uses of RoundingMode in java.text
Methods in java.text that return RoundingMode 变量和类型 方法 描述 RoundingModeDecimalFormat. getRoundingMode()获取此DecimalFormat中使用的RoundingMode。RoundingModeNumberFormat. getRoundingMode()获取此NumberFormat中使用的RoundingMode。Methods in java.text with parameters of type RoundingMode 变量和类型 方法 描述 voidDecimalFormat. setRoundingMode(RoundingMode roundingMode)设置此DecimalFormat中使用的RoundingMode。voidNumberFormat. setRoundingMode(RoundingMode roundingMode)设置此NumberFormat中使用的RoundingMode。
-