NumberFormat.IntegerInstance 属性

定义

返回当前默认 java.util.Locale.Category#FORMAT FORMAT 区域设置的整数格式。

public static Java.Text.NumberFormat IntegerInstance { [Android.Runtime.Register("getIntegerInstance", "()Ljava/text/NumberFormat;", "")] get; }
[<get: Android.Runtime.Register("getIntegerInstance", "()Ljava/text/NumberFormat;", "")>]
static member IntegerInstance : Java.Text.NumberFormat

属性值

整数值的数字格式

属性

注解

返回当前默认 java.util.Locale.Category#FORMAT FORMAT 区域设置的整数格式。 返回的数字格式配置为使用半连舍入将浮点数舍入到最接近的整数(见 java.math.RoundingMode#HALF_EVEN RoundingMode.HALF_EVEN)进行格式设置,并仅分析输入字符串的整数部分(请参阅 #isParseIntegerOnly isParseIntegerOnly)。

这相当于调用 #getIntegerInstance(Locale) getIntegerInstance(Locale.getDefault(Locale.Category.FORMAT))

在 1.4 中添加。

Java文档java.text.NumberFormat.getIntegerInstance()

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

适用于