Most visited

Recently visited

Added in API level 24

Measure

public class Measure
extends Object

java.lang.Object
    android.icu.util.Measure
Known Direct Subclasses


指定单位的数量,由数字和单位组成。 例如,长度度量由数字和长度单位组成,例如英尺或米。

度量对象由MeasureFormat的子类进行分析和格式化。

度量对象是不可变的。 所有的子类都必须保证。 (但是,不鼓励子类化。)

也可以看看:

摘要(Summary)

Public constructors

Measure(Number number, MeasureUnit unit)

给定一个数字和一个单位构造一个新对象。

公共方法(Public methods)

boolean equals(Object obj)

如果给定对象等于此对象,则返回true。

Number getNumber()

返回此对象的数值。

MeasureUnit getUnit()

返回此对象的单位。

int hashCode()

返回此对象的哈希码。

String toString()

返回此对象的字符串表示形式。

继承方法(Inherited methods)

From class java.lang.Object

Public constructors

Measure

Added in API level 24
Measure (Number number, 
                MeasureUnit unit)

给定一个数字和一个单位构造一个新对象。

参数(Parameters)
number Number: the number
unit MeasureUnit: the unit

公共方法(Public methods)

equals

Added in API level 24
boolean equals (Object obj)

如果给定对象等于此对象,则返回true。

参数(Parameters)
obj Object: the reference object with which to compare.
返回(Returns)
boolean true if this object is equal to the given object

getNumber

Added in API level 24
Number getNumber ()

返回此对象的数值。

返回(Returns)
Number this object's Number

getUnit

Added in API level 24
MeasureUnit getUnit ()

返回此对象的单位。

返回(Returns)
MeasureUnit this object's Unit

hashCode

Added in API level 24
int hashCode ()

返回此对象的哈希码。

返回(Returns)
int a 32-bit hash

toString

Added in API level 24
String toString ()

返回此对象的字符串表示形式。

返回(Returns)
String a string representation consisting of the ISO currency code together with the numeric amount

Hooray!