public class MeasureUnit extends Object implements Serializable
Measure
,
Serialized FormModifier and Type | Class and Description |
---|---|
static class |
MeasureUnit.Complexity
Enumeration for unit complexity.
|
protected static interface |
MeasureUnit.Factory
Deprecated.
This API is ICU internal only.
|
static class |
MeasureUnit.MeasurePrefix
Enumeration for SI and binary prefixes, e.g.
|
Modifier and Type | Field and Description |
---|---|
static MeasureUnit |
ACRE
Constant for unit of area: acre
|
static MeasureUnit |
ACRE_FOOT
Constant for unit of volume: acre-foot
|
static MeasureUnit |
AMPERE
Constant for unit of electric: ampere
|
static MeasureUnit |
ARC_MINUTE
Constant for unit of angle: arc-minute
|
static MeasureUnit |
ARC_SECOND
Constant for unit of angle: arc-second
|
static MeasureUnit |
ASTRONOMICAL_UNIT
Constant for unit of length: astronomical-unit
|
static MeasureUnit |
ATMOSPHERE
Constant for unit of pressure: atmosphere
|
static MeasureUnit |
BAR
Constant for unit of pressure: bar
|
static MeasureUnit |
BARREL
Constant for unit of volume: barrel
|
static MeasureUnit |
BEAUFORT
Constant for unit of speed: beaufort
|
static MeasureUnit |
BIT
Constant for unit of digital: bit
|
static MeasureUnit |
BRITISH_THERMAL_UNIT
Constant for unit of energy: british-thermal-unit
|
static MeasureUnit |
BUSHEL
Constant for unit of volume: bushel
|
static MeasureUnit |
BYTE
Constant for unit of digital: byte
|
static MeasureUnit |
CALORIE
Constant for unit of energy: calorie
|
static MeasureUnit |
CANDELA
Constant for unit of light: candela
|
static MeasureUnit |
CARAT
Constant for unit of mass: carat
|
static MeasureUnit |
CELSIUS
Constant for unit of temperature: celsius
|
static MeasureUnit |
CENTILITER
Constant for unit of volume: centiliter
|
static MeasureUnit |
CENTIMETER
Constant for unit of length: centimeter
|
static MeasureUnit |
CENTURY
Constant for unit of duration: century
|
static MeasureUnit |
CUBIC_CENTIMETER
Constant for unit of volume: cubic-centimeter
|
static MeasureUnit |
CUBIC_FOOT
Constant for unit of volume: cubic-foot
|
static MeasureUnit |
CUBIC_INCH
Constant for unit of volume: cubic-inch
|
static MeasureUnit |
CUBIC_KILOMETER
Constant for unit of volume: cubic-kilometer
|
static MeasureUnit |
CUBIC_METER
Constant for unit of volume: cubic-meter
|
static MeasureUnit |
CUBIC_MILE
Constant for unit of volume: cubic-mile
|
static MeasureUnit |
CUBIC_YARD
Constant for unit of volume: cubic-yard
|
static MeasureUnit |
CUP
Constant for unit of volume: cup
|
static MeasureUnit |
CUP_METRIC
Constant for unit of volume: cup-metric
|
static MeasureUnit |
DALTON
Constant for unit of mass: dalton
|
static TimeUnit |
DAY
Constant for unit of duration: day
|
static MeasureUnit |
DAY_PERSON
Constant for unit of duration: day-person
|
static MeasureUnit |
DECADE
Constant for unit of duration: decade
|
static MeasureUnit |
DECILITER
Constant for unit of volume: deciliter
|
static MeasureUnit |
DECIMETER
Constant for unit of length: decimeter
|
static MeasureUnit |
DEGREE
Constant for unit of angle: degree
|
static MeasureUnit |
DESSERT_SPOON
Constant for unit of volume: dessert-spoon
|
static MeasureUnit |
DESSERT_SPOON_IMPERIAL
Constant for unit of volume: dessert-spoon-imperial
|
static MeasureUnit |
DOT
Constant for unit of graphics: dot
|
static MeasureUnit |
DOT_PER_CENTIMETER
Constant for unit of graphics: dot-per-centimeter
|
static MeasureUnit |
DOT_PER_INCH
Constant for unit of graphics: dot-per-inch
|
static MeasureUnit |
DRAM
Constant for unit of volume: dram
|
static MeasureUnit |
DROP
Constant for unit of volume: drop
|
static MeasureUnit |
DUNAM
Constant for unit of area: dunam
|
static MeasureUnit |
EARTH_MASS
Constant for unit of mass: earth-mass
|
static MeasureUnit |
EARTH_RADIUS
Constant for unit of length: earth-radius
|
static MeasureUnit |
ELECTRONVOLT
Constant for unit of energy: electronvolt
|
static MeasureUnit |
EM
Constant for unit of graphics: em
|
static MeasureUnit |
FAHRENHEIT
Constant for unit of temperature: fahrenheit
|
static MeasureUnit |
FATHOM
Constant for unit of length: fathom
|
static MeasureUnit |
FLUID_OUNCE
Constant for unit of volume: fluid-ounce
|
static MeasureUnit |
FLUID_OUNCE_IMPERIAL
Constant for unit of volume: fluid-ounce-imperial
|
static MeasureUnit |
FOODCALORIE
Constant for unit of energy: foodcalorie
|
static MeasureUnit |
FOOT
Constant for unit of length: foot
|
static MeasureUnit |
FURLONG
Constant for unit of length: furlong
|
static MeasureUnit |
G_FORCE
Constant for unit of acceleration: g-force
|
static MeasureUnit |
GALLON
Constant for unit of volume: gallon
|
static MeasureUnit |
GALLON_IMPERIAL
Constant for unit of volume: gallon-imperial
|
static MeasureUnit |
GASOLINE_ENERGY_DENSITY
Constant for unit of pressure: gasoline-energy-density
|
static MeasureUnit |
GENERIC_TEMPERATURE
Constant for unit of temperature: generic
|
static MeasureUnit |
GIGABIT
Constant for unit of digital: gigabit
|
static MeasureUnit |
GIGABYTE
Constant for unit of digital: gigabyte
|
static MeasureUnit |
GIGAHERTZ
Constant for unit of frequency: gigahertz
|
static MeasureUnit |
GIGAWATT
Constant for unit of power: gigawatt
|
static MeasureUnit |
GRAIN
Constant for unit of mass: grain
|
static MeasureUnit |
GRAM
Constant for unit of mass: gram
|
static MeasureUnit |
HECTARE
Constant for unit of area: hectare
|
static MeasureUnit |
HECTOLITER
Constant for unit of volume: hectoliter
|
static MeasureUnit |
HECTOPASCAL
Constant for unit of pressure: hectopascal
|
static MeasureUnit |
HERTZ
Constant for unit of frequency: hertz
|
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-ofhg
|
static MeasureUnit |
ITEM
Constant for unit of concentr: item
|
static MeasureUnit |
JIGGER
Constant for unit of volume: jigger
|
static MeasureUnit |
JOULE
Constant for unit of energy: joule
|
static MeasureUnit |
KARAT
Constant for unit of concentr: karat
|
static MeasureUnit |
KELVIN
Constant for unit of temperature: kelvin
|
static MeasureUnit |
KILOBIT
Constant for unit of digital: kilobit
|
static MeasureUnit |
KILOBYTE
Constant for unit of digital: kilobyte
|
static MeasureUnit |
KILOCALORIE
Constant for unit of energy: kilocalorie
|
static MeasureUnit |
KILOGRAM
Constant for unit of mass: kilogram
|
static MeasureUnit |
KILOHERTZ
Constant for unit of frequency: kilohertz
|
static MeasureUnit |
KILOJOULE
Constant for unit of energy: kilojoule
|
static MeasureUnit |
KILOMETER
Constant for unit of length: kilometer
|
static MeasureUnit |
KILOMETER_PER_HOUR
Constant for unit of speed: kilometer-per-hour
|
static MeasureUnit |
KILOPASCAL
Constant for unit of pressure: kilopascal
|
static MeasureUnit |
KILOWATT
Constant for unit of power: kilowatt
|
static MeasureUnit |
KILOWATT_HOUR
Constant for unit of energy: kilowatt-hour
|
static MeasureUnit |
KILOWATT_HOUR_PER_100_KILOMETER
Constant for unit of force: kilowatt-hour-per-100-kilometer
|
static MeasureUnit |
KNOT
Constant for unit of speed: knot
|
static MeasureUnit |
LIGHT_SPEED
Constant for unit of speed: light-speed
|
static MeasureUnit |
LIGHT_YEAR
Constant for unit of length: light-year
|
static MeasureUnit |
LITER
Constant for unit of volume: liter
|
static MeasureUnit |
LITER_PER_100KILOMETERS
Constant for unit of consumption: liter-per-100-kilometer
|
static MeasureUnit |
LITER_PER_KILOMETER
Constant for unit of consumption: liter-per-kilometer
|
static MeasureUnit |
LUMEN
Constant for unit of light: lumen
|
static MeasureUnit |
LUX
Constant for unit of light: lux
|
static MeasureUnit |
MEGABIT
Constant for unit of digital: megabit
|
static MeasureUnit |
MEGABYTE
Constant for unit of digital: megabyte
|
static MeasureUnit |
MEGAHERTZ
Constant for unit of frequency: megahertz
|
static MeasureUnit |
MEGALITER
Constant for unit of volume: megaliter
|
static MeasureUnit |
MEGAPASCAL
Constant for unit of pressure: megapascal
|
static MeasureUnit |
MEGAPIXEL
Constant for unit of graphics: megapixel
|
static MeasureUnit |
MEGAWATT
Constant for unit of power: megawatt
|
static MeasureUnit |
METER
Constant for unit of length: meter
|
static MeasureUnit |
METER_PER_SECOND
Constant for unit of speed: meter-per-second
|
static MeasureUnit |
METER_PER_SECOND_SQUARED
Constant for unit of acceleration: meter-per-square-second
|
static MeasureUnit |
METRIC_TON
Constant for unit of mass: metric-ton (renamed to tonne in CLDR 42 / ICU 72).
|
static MeasureUnit |
MICROGRAM
Constant for unit of mass: microgram
|
static MeasureUnit |
MICROMETER
Constant for unit of length: micrometer
|
static MeasureUnit |
MICROSECOND
Constant for unit of duration: microsecond
|
static MeasureUnit |
MILE
Constant for unit of length: mile
|
static MeasureUnit |
MILE_PER_GALLON
Constant for unit of consumption: mile-per-gallon
|
static MeasureUnit |
MILE_PER_GALLON_IMPERIAL
Constant for unit of consumption: mile-per-gallon-imperial
|
static MeasureUnit |
MILE_PER_HOUR
Constant for unit of speed: mile-per-hour
|
static MeasureUnit |
MILE_SCANDINAVIAN
Constant for unit of length: mile-scandinavian
|
static MeasureUnit |
MILLIAMPERE
Constant for unit of electric: milliampere
|
static MeasureUnit |
MILLIBAR
Constant for unit of pressure: millibar
|
static MeasureUnit |
MILLIGRAM
Constant for unit of mass: milligram
|
static MeasureUnit |
MILLIGRAM_OFGLUCOSE_PER_DECILITER
Constant for unit of concentr: milligram-ofglucose-per-deciliter
|
static MeasureUnit |
MILLIGRAM_PER_DECILITER
Constant for unit of concentr: milligram-per-deciliter
|
static MeasureUnit |
MILLILITER
Constant for unit of volume: milliliter
|
static MeasureUnit |
MILLIMETER
Constant for unit of length: millimeter
|
static MeasureUnit |
MILLIMETER_OF_MERCURY
Constant for unit of pressure: millimeter-ofhg
|
static MeasureUnit |
MILLIMOLE_PER_LITER
Constant for unit of concentr: millimole-per-liter
|
static MeasureUnit |
MILLISECOND
Constant for unit of duration: millisecond
|
static MeasureUnit |
MILLIWATT
Constant for unit of power: milliwatt
|
static TimeUnit |
MINUTE
Constant for unit of duration: minute
|
static MeasureUnit |
MOLE
Constant for unit of concentr: mole
|
static TimeUnit |
MONTH
Constant for unit of duration: month
|
static MeasureUnit |
MONTH_PERSON
Constant for unit of duration: month-person
|
static MeasureUnit |
NANOMETER
Constant for unit of length: nanometer
|
static MeasureUnit |
NANOSECOND
Constant for unit of duration: nanosecond
|
static MeasureUnit |
NAUTICAL_MILE
Constant for unit of length: nautical-mile
|
static MeasureUnit |
NEWTON
Constant for unit of force: newton
|
static MeasureUnit |
NEWTON_METER
Constant for unit of torque: newton-meter
|
static MeasureUnit |
NIGHT
Constant for unit of duration: night
|
static MeasureUnit |
OHM
Constant for unit of electric: ohm
|
static MeasureUnit |
OUNCE
Constant for unit of mass: ounce
|
static MeasureUnit |
OUNCE_TROY
Constant for unit of mass: ounce-troy
|
static MeasureUnit |
PARSEC
Constant for unit of length: parsec
|
static MeasureUnit |
PART_PER_MILLION
Constant for unit of concentr: permillion
|
static MeasureUnit |
PASCAL
Constant for unit of pressure: pascal
|
static MeasureUnit |
PERCENT
Constant for unit of concentr: percent
|
static MeasureUnit |
PERMILLE
Constant for unit of concentr: permille
|
static MeasureUnit |
PERMYRIAD
Constant for unit of concentr: permyriad
|
static MeasureUnit |
PETABYTE
Constant for unit of digital: petabyte
|
static MeasureUnit |
PICOMETER
Constant for unit of length: picometer
|
static MeasureUnit |
PINCH
Constant for unit of volume: pinch
|
static MeasureUnit |
PINT
Constant for unit of volume: pint
|
static MeasureUnit |
PINT_METRIC
Constant for unit of volume: pint-metric
|
static MeasureUnit |
PIXEL
Constant for unit of graphics: pixel
|
static MeasureUnit |
PIXEL_PER_CENTIMETER
Constant for unit of graphics: pixel-per-centimeter
|
static MeasureUnit |
PIXEL_PER_INCH
Constant for unit of graphics: pixel-per-inch
|
static MeasureUnit |
POINT
Constant for unit of length: point
|
static MeasureUnit |
POUND
Constant for unit of mass: pound
|
static MeasureUnit |
POUND_FOOT
Constant for unit of torque: pound-force-foot
|
static MeasureUnit |
POUND_FORCE
Constant for unit of force: pound-force
|
static MeasureUnit |
POUND_PER_SQUARE_INCH
Constant for unit of pressure: pound-force-per-square-inch
|
static MeasureUnit |
QUART
Constant for unit of volume: quart
|
static MeasureUnit |
QUART_IMPERIAL
Constant for unit of volume: quart-imperial
|
static MeasureUnit |
QUARTER
Constant for unit of duration: quarter
|
static MeasureUnit |
RADIAN
Constant for unit of angle: radian
|
static MeasureUnit |
REVOLUTION_ANGLE
Constant for unit of angle: revolution
|
static TimeUnit |
SECOND
Constant for unit of duration: second
|
static MeasureUnit |
SOLAR_LUMINOSITY
Constant for unit of light: solar-luminosity
|
static MeasureUnit |
SOLAR_MASS
Constant for unit of mass: solar-mass
|
static MeasureUnit |
SOLAR_RADIUS
Constant for unit of length: solar-radius
|
static MeasureUnit |
SQUARE_CENTIMETER
Constant for unit of area: square-centimeter
|
static MeasureUnit |
SQUARE_FOOT
Constant for unit of area: square-foot
|
static MeasureUnit |
SQUARE_INCH
Constant for unit of area: square-inch
|
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
|
static MeasureUnit |
SQUARE_YARD
Constant for unit of area: square-yard
|
static MeasureUnit |
STONE
Constant for unit of mass: stone
|
protected String |
subType
Deprecated.
This API is ICU internal only.
|
static MeasureUnit |
TABLESPOON
Constant for unit of volume: tablespoon
|
static MeasureUnit |
TEASPOON
Constant for unit of volume: teaspoon
|
static MeasureUnit |
TERABIT
Constant for unit of digital: terabit
|
static MeasureUnit |
TERABYTE
Constant for unit of digital: terabyte
|
static MeasureUnit |
THERM_US
Constant for unit of energy: therm-us
|
static MeasureUnit |
TON
Constant for unit of mass: ton
|
static MeasureUnit |
TONNE
Constant for unit of mass: tonne
|
protected String |
type
Deprecated.
This API is ICU internal only.
|
static MeasureUnit |
VOLT
Constant for unit of electric: volt
|
static MeasureUnit |
WATT
Constant for unit of power: watt
|
static TimeUnit |
WEEK
Constant for unit of duration: week
|
static MeasureUnit |
WEEK_PERSON
Constant for unit of duration: week-person
|
static MeasureUnit |
YARD
Constant for unit of length: yard
|
static TimeUnit |
YEAR
Constant for unit of duration: year
|
static MeasureUnit |
YEAR_PERSON
Constant for unit of duration: year-person
|
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 MeasureUnit |
findBySubType(String subType)
Deprecated.
This API is ICU internal only.
|
static MeasureUnit |
forIdentifier(String identifier)
Construct a MeasureUnit from a CLDR Core Unit Identifier, defined in UTS
35.
|
static MeasureUnit |
fromMeasureUnitImpl(com.ibm.icu.impl.units.MeasureUnitImpl measureUnitImpl)
Deprecated.
Internal API for ICU use only.
|
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.
|
MeasureUnit.Complexity |
getComplexity()
Compute the complexity of the unit.
|
com.ibm.icu.impl.units.MeasureUnitImpl |
getCopyOfMeasureUnitImpl()
Deprecated.
This API is ICU internal only.
|
int |
getDimensionality()
Returns the dimensionality (power) of this MeasureUnit.
|
String |
getIdentifier()
Get CLDR Unit Identifier for this MeasureUnit, as defined in UTS 35.
|
MeasureUnit.MeasurePrefix |
getPrefix()
Returns the current SI or binary prefix of this SINGLE unit.
|
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.
|
MeasureUnit |
product(MeasureUnit other)
Computes the product of this unit with another unit.
|
MeasureUnit |
reciprocal()
Computes the reciprocal of this MeasureUnit, with the numerator and denominator flipped.
|
List<MeasureUnit> |
splitToSingleUnits()
Returns the list of SINGLE units contained within a sequence of COMPOUND units.
|
String |
toString() |
MeasureUnit |
withDimensionality(int dimensionality)
Creates a MeasureUnit which is this SINGLE unit augmented with the specified dimensionality
(power).
|
MeasureUnit |
withPrefix(MeasureUnit.MeasurePrefix prefix)
Creates a MeasureUnit which is this SINGLE unit augmented with the specified prefix.
|
@Deprecated protected final String type
@Deprecated protected final String subType
public static final MeasureUnit G_FORCE
public static final MeasureUnit METER_PER_SECOND_SQUARED
public static final MeasureUnit ARC_MINUTE
public static final MeasureUnit ARC_SECOND
public static final MeasureUnit DEGREE
public static final MeasureUnit RADIAN
public static final MeasureUnit REVOLUTION_ANGLE
public static final MeasureUnit ACRE
public static final MeasureUnit DUNAM
public static final MeasureUnit HECTARE
public static final MeasureUnit SQUARE_CENTIMETER
public static final MeasureUnit SQUARE_FOOT
public static final MeasureUnit SQUARE_INCH
public static final MeasureUnit SQUARE_KILOMETER
public static final MeasureUnit SQUARE_METER
public static final MeasureUnit SQUARE_MILE
public static final MeasureUnit SQUARE_YARD
public static final MeasureUnit ITEM
public static final MeasureUnit KARAT
public static final MeasureUnit MILLIGRAM_OFGLUCOSE_PER_DECILITER
public static final MeasureUnit MILLIGRAM_PER_DECILITER
public static final MeasureUnit MILLIMOLE_PER_LITER
public static final MeasureUnit MOLE
public static final MeasureUnit PERCENT
public static final MeasureUnit PERMILLE
public static final MeasureUnit PART_PER_MILLION
public static final MeasureUnit PERMYRIAD
public static final MeasureUnit LITER_PER_100KILOMETERS
public static final MeasureUnit LITER_PER_KILOMETER
public static final MeasureUnit MILE_PER_GALLON
public static final MeasureUnit MILE_PER_GALLON_IMPERIAL
public static final MeasureUnit BIT
public static final MeasureUnit BYTE
public static final MeasureUnit GIGABIT
public static final MeasureUnit GIGABYTE
public static final MeasureUnit KILOBIT
public static final MeasureUnit KILOBYTE
public static final MeasureUnit MEGABIT
public static final MeasureUnit MEGABYTE
public static final MeasureUnit PETABYTE
public static final MeasureUnit TERABIT
public static final MeasureUnit TERABYTE
public static final MeasureUnit CENTURY
public static final TimeUnit DAY
public static final MeasureUnit DAY_PERSON
public static final MeasureUnit DECADE
public static final TimeUnit HOUR
public static final MeasureUnit MICROSECOND
public static final MeasureUnit MILLISECOND
public static final TimeUnit MINUTE
public static final TimeUnit MONTH
public static final MeasureUnit MONTH_PERSON
public static final MeasureUnit NANOSECOND
public static final MeasureUnit NIGHT
public static final MeasureUnit QUARTER
public static final TimeUnit SECOND
public static final TimeUnit WEEK
public static final MeasureUnit WEEK_PERSON
public static final TimeUnit YEAR
public static final MeasureUnit YEAR_PERSON
public static final MeasureUnit AMPERE
public static final MeasureUnit MILLIAMPERE
public static final MeasureUnit OHM
public static final MeasureUnit VOLT
public static final MeasureUnit BRITISH_THERMAL_UNIT
public static final MeasureUnit CALORIE
public static final MeasureUnit ELECTRONVOLT
public static final MeasureUnit FOODCALORIE
public static final MeasureUnit JOULE
public static final MeasureUnit KILOCALORIE
public static final MeasureUnit KILOJOULE
public static final MeasureUnit KILOWATT_HOUR
public static final MeasureUnit THERM_US
public static final MeasureUnit KILOWATT_HOUR_PER_100_KILOMETER
public static final MeasureUnit NEWTON
public static final MeasureUnit POUND_FORCE
public static final MeasureUnit GIGAHERTZ
public static final MeasureUnit HERTZ
public static final MeasureUnit KILOHERTZ
public static final MeasureUnit MEGAHERTZ
public static final MeasureUnit DOT
public static final MeasureUnit DOT_PER_CENTIMETER
public static final MeasureUnit DOT_PER_INCH
public static final MeasureUnit EM
public static final MeasureUnit MEGAPIXEL
public static final MeasureUnit PIXEL
public static final MeasureUnit PIXEL_PER_CENTIMETER
public static final MeasureUnit PIXEL_PER_INCH
public static final MeasureUnit ASTRONOMICAL_UNIT
public static final MeasureUnit CENTIMETER
public static final MeasureUnit DECIMETER
public static final MeasureUnit EARTH_RADIUS
public static final MeasureUnit FATHOM
public static final MeasureUnit FOOT
public static final MeasureUnit FURLONG
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 MICROMETER
public static final MeasureUnit MILE
public static final MeasureUnit MILE_SCANDINAVIAN
public static final MeasureUnit MILLIMETER
public static final MeasureUnit NANOMETER
public static final MeasureUnit NAUTICAL_MILE
public static final MeasureUnit PARSEC
public static final MeasureUnit PICOMETER
public static final MeasureUnit POINT
public static final MeasureUnit SOLAR_RADIUS
public static final MeasureUnit YARD
public static final MeasureUnit CANDELA
public static final MeasureUnit LUMEN
public static final MeasureUnit LUX
public static final MeasureUnit SOLAR_LUMINOSITY
public static final MeasureUnit CARAT
public static final MeasureUnit DALTON
public static final MeasureUnit EARTH_MASS
public static final MeasureUnit GRAIN
public static final MeasureUnit GRAM
public static final MeasureUnit KILOGRAM
public static final MeasureUnit METRIC_TON
public static final MeasureUnit MICROGRAM
public static final MeasureUnit MILLIGRAM
public static final MeasureUnit OUNCE
public static final MeasureUnit OUNCE_TROY
public static final MeasureUnit POUND
public static final MeasureUnit SOLAR_MASS
public static final MeasureUnit STONE
public static final MeasureUnit TON
public static final MeasureUnit TONNE
public static final MeasureUnit GIGAWATT
public static final MeasureUnit HORSEPOWER
public static final MeasureUnit KILOWATT
public static final MeasureUnit MEGAWATT
public static final MeasureUnit MILLIWATT
public static final MeasureUnit WATT
public static final MeasureUnit ATMOSPHERE
public static final MeasureUnit BAR
public static final MeasureUnit GASOLINE_ENERGY_DENSITY
public static final MeasureUnit HECTOPASCAL
public static final MeasureUnit INCH_HG
public static final MeasureUnit KILOPASCAL
public static final MeasureUnit MEGAPASCAL
public static final MeasureUnit MILLIBAR
public static final MeasureUnit MILLIMETER_OF_MERCURY
public static final MeasureUnit PASCAL
public static final MeasureUnit POUND_PER_SQUARE_INCH
public static final MeasureUnit BEAUFORT
public static final MeasureUnit KILOMETER_PER_HOUR
public static final MeasureUnit KNOT
public static final MeasureUnit LIGHT_SPEED
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 GENERIC_TEMPERATURE
public static final MeasureUnit KELVIN
public static final MeasureUnit NEWTON_METER
public static final MeasureUnit POUND_FOOT
public static final MeasureUnit ACRE_FOOT
public static final MeasureUnit BARREL
public static final MeasureUnit BUSHEL
public static final MeasureUnit CENTILITER
public static final MeasureUnit CUBIC_CENTIMETER
public static final MeasureUnit CUBIC_FOOT
public static final MeasureUnit CUBIC_INCH
public static final MeasureUnit CUBIC_KILOMETER
public static final MeasureUnit CUBIC_METER
public static final MeasureUnit CUBIC_MILE
public static final MeasureUnit CUBIC_YARD
public static final MeasureUnit CUP
public static final MeasureUnit CUP_METRIC
public static final MeasureUnit DECILITER
public static final MeasureUnit DESSERT_SPOON
public static final MeasureUnit DESSERT_SPOON_IMPERIAL
public static final MeasureUnit DRAM
public static final MeasureUnit DROP
public static final MeasureUnit FLUID_OUNCE
public static final MeasureUnit FLUID_OUNCE_IMPERIAL
public static final MeasureUnit GALLON
public static final MeasureUnit GALLON_IMPERIAL
public static final MeasureUnit HECTOLITER
public static final MeasureUnit JIGGER
public static final MeasureUnit LITER
public static final MeasureUnit MEGALITER
public static final MeasureUnit MILLILITER
public static final MeasureUnit PINCH
public static final MeasureUnit PINT
public static final MeasureUnit PINT_METRIC
public static final MeasureUnit QUART
public static final MeasureUnit QUART_IMPERIAL
public static final MeasureUnit TABLESPOON
public static final MeasureUnit TEASPOON
@Deprecated protected MeasureUnit(String type, String subType)
public static MeasureUnit forIdentifier(String identifier)
MeasureUnit
is null
MeasureUnit example = MeasureUnit::forIdentifier("furlong-per-nanosecond")
identifier
- CLDR Unit IdentifierIllegalArgumentException
- if the identifier is invalid.@Deprecated public static MeasureUnit fromMeasureUnitImpl(com.ibm.icu.impl.units.MeasureUnitImpl measureUnitImpl)
public String getType()
public String getSubtype()
public String getIdentifier()
public MeasureUnit.Complexity getComplexity()
public MeasureUnit withPrefix(MeasureUnit.MeasurePrefix prefix)
this
if this unit already has that prefix.
There is sufficient locale data to format all standard prefixes.
NOTE: Only works on SINGLE units. If this is a COMPOUND or MIXED unit, an error will
occur. For more information, MeasureUnit.Complexity
.
prefix
- The prefix, from MeasurePrefix.UnsupportedOperationException
- if this unit is a COMPOUND or MIXED unit.public MeasureUnit.MeasurePrefix getPrefix()
NOTE: Only works on SINGLE units. If this is a COMPOUND or MIXED unit, an
error will occur. For more information, MeasureUnit.Complexity
.
UnsupportedOperationException
- if the unit is COMPOUND or MIXED.public int getDimensionality()
NOTE: Only works on SINGLE units. If this is a COMPOUND or MIXED unit, an exception will be thrown.
For more information, MeasureUnit.Complexity
.
UnsupportedOperationException
- if the unit is COMPOUND or MIXED.public MeasureUnit withDimensionality(int dimensionality)
NOTE: Only works on SINGLE units. If this is a COMPOUND or MIXED unit, an exception is thrown.
For more information, MeasureUnit.Complexity
.
dimensionality
- The dimensionality (power).UnsupportedOperationException
- if the unit is COMPOUND or MIXED.public MeasureUnit reciprocal()
For example, if the receiver is "meter-per-second", the unit "second-per-meter" is returned.
NOTE: Only works on SINGLE and COMPOUND units. If this is a MIXED unit, an error will
occur. For more information, MeasureUnit.Complexity
.
UnsupportedOperationException
- if the unit is MIXED.public MeasureUnit product(MeasureUnit other)
The numerator and denominator are preserved through this operation.
For example, if the receiver is "kilowatt" and the argument is "hour-per-day", then the unit "kilowatt-hour-per-day" is returned.
NOTE: Only works on SINGLE and COMPOUND units. If either unit (receivee and argument) is a
MIXED unit, an error will occur. For more information, MeasureUnit.Complexity
.
other
- The MeasureUnit to multiply with the target.UnsupportedOperationException
- if the unit is MIXED.public List<MeasureUnit> splitToSingleUnits()
Examples: - Given "meter-kilogram-per-second", three units will be returned: "meter", "kilogram", and "per-second". - Given "hour+minute+second", three units will be returned: "hour", "minute", and "second".
If this is a SINGLE unit, a list of length 1 will be returned.
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 public static MeasureUnit findBySubType(String subType)
@Deprecated protected static MeasureUnit addUnit(String type, String unitName, MeasureUnit.Factory factory)
@Deprecated public com.ibm.icu.impl.units.MeasureUnitImpl getCopyOfMeasureUnitImpl()
Copyright © 2016 Unicode, Inc. and others.