Class Measure
java.lang.Object
com.ibm.icu.util.Measure
- Direct Known Subclasses:
CurrencyAmount, TimeUnitAmount
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.)
- Author:
- Alan Liu
- See Also:
- Status:
- Stable ICU 3.0.
-
Constructor Summary
ConstructorsConstructorDescriptionMeasure(Number number, MeasureUnit unit) Constructs a new object given a number and a unit. -
Method Summary
-
Constructor Details
-
Measure
Constructs a new object given a number and a unit.- Parameters:
number- the numberunit- the unit- Status:
- Stable ICU 3.0.
-
-
Method Details
-
equals
-
hashCode
-
toString
-
getNumber
Returns the numeric value of this object.- Returns:
- this object's Number
- Status:
- Stable ICU 3.0.
-
getUnit
Returns the unit of this object.- Returns:
- this object's Unit
- Status:
- Stable ICU 3.0.
-