public class MeasureUnit extends Object implements Serializable
Measure
,
Serialized FormModifier and Type | Class and Description |
---|---|
protected static interface |
MeasureUnit.Factory
Deprecated.
This API is ICU internal only.
|
Modifier and Type | Field and Description |
---|---|
static MeasureUnit |
ACRE
Constant for unit of area: acre
|
static MeasureUnit |
ARC_MINUTE
Constant for unit of angle: minute
|
static MeasureUnit |
ARC_SECOND
Constant for unit of angle: second
|
static MeasureUnit |
CELSIUS
Constant for unit of temperature: celsius
|
static MeasureUnit |
CENTIMETER
Constant for unit of length: centimeter
|
static MeasureUnit |
CUBIC_KILOMETER
Constant for unit of volume: cubic-kilometer
|
static MeasureUnit |
CUBIC_MILE
Constant for unit of volume: cubic-mile
|
static TimeUnit |
DAY
Constant for unit of duration: day
|
static MeasureUnit |
DEGREE
Constant for unit of angle: degree
|
static MeasureUnit |
FAHRENHEIT
Constant for unit of temperature: fahrenheit
|
static MeasureUnit |
FOOT
Constant for unit of length: foot
|
static MeasureUnit |
G_FORCE
Constant for unit of acceleration: g-force
|
static MeasureUnit |
GRAM
Constant for unit of mass: gram
|
static MeasureUnit |
HECTARE
Constant for unit of area: hectare
|
static MeasureUnit |
HECTOPASCAL
Constant for unit of pressure: hectopascal
|
static MeasureUnit |
HORSEPOWER
Constant for unit of power: horsepower
|
static TimeUnit |
HOUR
Constant for unit of duration: hour
|
static MeasureUnit |
INCH
Constant for unit of length: inch
|
static MeasureUnit |
INCH_HG
Constant for unit of pressure: inch-hg
|
static MeasureUnit |
KILOGRAM
Constant for unit of mass: kilogram
|
static MeasureUnit |
KILOMETER
Constant for unit of length: kilometer
|
static MeasureUnit |
KILOMETER_PER_HOUR
Constant for unit of speed: kilometer-per-hour
|
static MeasureUnit |
KILOWATT
Constant for unit of power: kilowatt
|
static MeasureUnit |
LIGHT_YEAR
Constant for unit of length: light-year
|
static MeasureUnit |
LITER
Constant for unit of volume: liter
|
static MeasureUnit |
METER
Constant for unit of length: meter
|
static MeasureUnit |
METER_PER_SECOND
Constant for unit of speed: meter-per-second
|
static MeasureUnit |
MILE
Constant for unit of length: mile
|
static MeasureUnit |
MILE_PER_HOUR
Constant for unit of speed: mile-per-hour
|
static MeasureUnit |
MILLIBAR
Constant for unit of pressure: millibar
|
static MeasureUnit |
MILLIMETER
Constant for unit of length: millimeter
|
static MeasureUnit |
MILLISECOND
Constant for unit of duration: millisecond
|
static TimeUnit |
MINUTE
Constant for unit of duration: minute
|
static TimeUnit |
MONTH
Constant for unit of duration: month
|
static MeasureUnit |
OUNCE
Constant for unit of mass: ounce
|
static MeasureUnit |
PICOMETER
Constant for unit of length: picometer
|
static MeasureUnit |
POUND
Constant for unit of mass: pound
|
static TimeUnit |
SECOND
Constant for unit of duration: second
|
static MeasureUnit |
SQUARE_FOOT
Constant for unit of area: square-foot
|
static MeasureUnit |
SQUARE_KILOMETER
Constant for unit of area: square-kilometer
|
static MeasureUnit |
SQUARE_METER
Constant for unit of area: square-meter
|
static MeasureUnit |
SQUARE_MILE
Constant for unit of area: square-mile
|
protected String |
subType
Deprecated.
This API is ICU internal only.
|
protected String |
type
Deprecated.
This API is ICU internal only.
|
static MeasureUnit |
WATT
Constant for unit of power: watt
|
static TimeUnit |
WEEK
Constant for unit of duration: week
|
static MeasureUnit |
YARD
Constant for unit of length: yard
|
static TimeUnit |
YEAR
Constant for unit of duration: year
|
Modifier | Constructor and Description |
---|---|
protected |
MeasureUnit(String type,
String subType)
Deprecated.
This API is ICU internal only.
|
Modifier and Type | Method and Description |
---|---|
protected static MeasureUnit |
addUnit(String type,
String unitName,
MeasureUnit.Factory factory)
Deprecated.
This API is ICU internal only.
|
boolean |
equals(Object rhs) |
static Set<MeasureUnit> |
getAvailable()
Get all of the available units.
|
static Set<MeasureUnit> |
getAvailable(String type)
For the given type, return the available units.
|
static Set<String> |
getAvailableTypes()
Get all of the available units' types.
|
String |
getSubtype()
Get the subType, such as “foot”.
|
String |
getType()
Get the type, such as "length"
|
int |
hashCode() |
static MeasureUnit |
internalGetInstance(String type,
String subType)
Deprecated.
This API is ICU internal only.
|
String |
toString() |
@Deprecated protected final String type
@Deprecated protected final String subType
public static final MeasureUnit G_FORCE
public static final MeasureUnit DEGREE
public static final MeasureUnit ARC_MINUTE
public static final MeasureUnit ARC_SECOND
public static final MeasureUnit ACRE
public static final MeasureUnit HECTARE
public static final MeasureUnit SQUARE_FOOT
public static final MeasureUnit SQUARE_KILOMETER
public static final MeasureUnit SQUARE_METER
public static final MeasureUnit SQUARE_MILE
public static final MeasureUnit MILLISECOND
public static final MeasureUnit CENTIMETER
public static final MeasureUnit FOOT
public static final MeasureUnit INCH
public static final MeasureUnit KILOMETER
public static final MeasureUnit LIGHT_YEAR
public static final MeasureUnit METER
public static final MeasureUnit MILE
public static final MeasureUnit MILLIMETER
public static final MeasureUnit PICOMETER
public static final MeasureUnit YARD
public static final MeasureUnit GRAM
public static final MeasureUnit KILOGRAM
public static final MeasureUnit OUNCE
public static final MeasureUnit POUND
public static final MeasureUnit HORSEPOWER
public static final MeasureUnit KILOWATT
public static final MeasureUnit WATT
public static final MeasureUnit HECTOPASCAL
public static final MeasureUnit INCH_HG
public static final MeasureUnit MILLIBAR
public static final MeasureUnit KILOMETER_PER_HOUR
public static final MeasureUnit METER_PER_SECOND
public static final MeasureUnit MILE_PER_HOUR
public static final MeasureUnit CELSIUS
public static final MeasureUnit FAHRENHEIT
public static final MeasureUnit CUBIC_KILOMETER
public static final MeasureUnit CUBIC_MILE
public static final MeasureUnit LITER
public static TimeUnit YEAR
public static TimeUnit MONTH
public static TimeUnit WEEK
public static TimeUnit DAY
public static TimeUnit HOUR
public static TimeUnit MINUTE
public static TimeUnit SECOND
@Deprecated protected MeasureUnit(String type, String subType)
public String getType()
public String getSubtype()
public static Set<String> getAvailableTypes()
public static Set<MeasureUnit> getAvailable(String type)
type
- the typepublic static Set<MeasureUnit> getAvailable()
@Deprecated public static MeasureUnit internalGetInstance(String type, String subType)
Normally this method should not be used, since there will be no formatting data available for it, and it may not be returned by getAvailable(). However, for special purposes (such as CLDR tooling), it is available.
@Deprecated protected static MeasureUnit addUnit(String type, String unitName, MeasureUnit.Factory factory)
Copyright (c) 2014 IBM Corporation and others.