# Print output for @column tags ?>
public
class
Measure
extends Object
java.lang.Object | |
↳ | android.icu.util.Measure |
An amount of a specified unit, consisting of a Number and a Unit. For example, a length measure consists of a Number and a length unit, such as feet or meters.
Measure objects are parsed and formatted by subclasses of MeasureFormat.
Measure objects are immutable. All subclasses must guarantee that. (However, subclassing is discouraged.)
See also:
Public constructors | |
---|---|
Measure(Number number, MeasureUnit unit)
Constructs a new object given a number and a unit. |
Public methods | |
---|---|
boolean
|
equals(Object obj)
Returns true if the given object is equal to this object. |
Number
|
getNumber()
Returns the numeric value of this object. |
MeasureUnit
|
getUnit()
Returns the unit of this object. |
int
|
hashCode()
Returns a hashcode for this object. |
String
|
toString()
Returns a string representation of this object. |
Inherited methods | |
---|---|
public Measure (Number number, MeasureUnit unit)
Constructs a new object given a number and a unit.
Parameters | |
---|---|
number |
Number : the number |
unit |
MeasureUnit : the unit |
public boolean equals (Object obj)
Returns true if the given object is equal to this object.
Parameters | |
---|---|
obj |
Object : the reference object with which to compare. |
Returns | |
---|---|
boolean |
true if this object is equal to the given object |
public Number getNumber ()
Returns the numeric value of this object.
Returns | |
---|---|
Number |
this object's Number |
public MeasureUnit getUnit ()
Returns the unit of this object.
Returns | |
---|---|
MeasureUnit |
this object's Unit |
public int hashCode ()
Returns a hashcode for this object.
Returns | |
---|---|
int |
a 32-bit hash |