Enum MeasureUnit.MeasurePrefix
- All Implemented Interfaces:
Serializable, Comparable<MeasureUnit.MeasurePrefix>
- Enclosing class:
MeasureUnit
Enumeration for SI and binary prefixes, e.g. "kilo-", "nano-", "mebi-".
- Author:
- Alan Liu
- Status:
- Stable ICU 69.
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionSI prefix: atto, 10^-18.SI prefix: centi, 10^-2.SI prefix: deci, 10^-1.SI prefix: deka, 10^1.SI prefix: exa, 10^18.IEC binary prefix: exbi, 1024^6.SI prefix: femto, 10^-15.IEC binary prefix: gibi, 1024^3.SI prefix: giga, 10^9.SI prefix: hecto, 10^2.IEC binary prefix: kibi, 1024^1.SI prefix: kilo, 10^3.IEC binary prefix: mebi, 1024^2.SI prefix: mega, 10^6.SI prefix: micro, 10^-6.SI prefix: milli, 10^-3.SI prefix: nano, 10^-9.The absence of an SI prefix.IEC binary prefix: pebi, 1024^5.SI prefix: peta, 10^15.SI prefix: pico, 10^-12.SI prefix: quecto, 10^-30.SI prefix: quetta, 10^30.SI prefix: ronna, 10^27.SI prefix: ronto, 10^-27.IEC binary prefix: tebi, 1024^4.SI prefix: tera, 10^12.IEC binary prefix: yobi, 1024^8.SI prefix: yocto, 10^-24.SI prefix: yotta, 10^24.IEC binary prefix: zebi, 1024^7.SI prefix: zepto, 10^-21.SI prefix: zetta, 10^21. -
Method Summary
Modifier and TypeMethodDescriptionintgetBase()Returns the base of the prefix.Deprecated.This API is ICU internal only.intgetPower()Returns the power of the prefix.static MeasureUnit.MeasurePrefixReturns the enum constant of this type with the specified name.static MeasureUnit.MeasurePrefix[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
QUETTA
SI prefix: quetta, 10^30.- Status:
- Stable ICU 75.
-
RONNA
-
YOTTA
-
ZETTA
-
EXA
-
PETA
-
TERA
-
GIGA
-
MEGA
-
KILO
-
HECTO
-
DEKA
-
ONE
The absence of an SI prefix.- Status:
- Stable ICU 69.
-
DECI
-
CENTI
-
MILLI
-
MICRO
-
NANO
-
PICO
-
FEMTO
-
ATTO
-
ZEPTO
-
YOCTO
-
RONTO
-
QUECTO
SI prefix: quecto, 10^-30.- Status:
- Stable ICU 75.
-
KIBI
IEC binary prefix: kibi, 1024^1.- Status:
- Stable ICU 69.
-
MEBI
IEC binary prefix: mebi, 1024^2.- Status:
- Stable ICU 69.
-
GIBI
IEC binary prefix: gibi, 1024^3.- Status:
- Stable ICU 69.
-
TEBI
IEC binary prefix: tebi, 1024^4.- Status:
- Stable ICU 69.
-
PEBI
IEC binary prefix: pebi, 1024^5.- Status:
- Stable ICU 69.
-
EXBI
IEC binary prefix: exbi, 1024^6.- Status:
- Stable ICU 69.
-
ZEBI
IEC binary prefix: zebi, 1024^7.- Status:
- Stable ICU 69.
-
YOBI
IEC binary prefix: yobi, 1024^8.- Status:
- Stable ICU 69.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
getIdentifier
Deprecated.This API is ICU internal only.Returns the identifier of the prefix.- Status:
- Internal. This API is ICU internal only.
-
getBase
public int getBase()Returns the base of the prefix. For example: - if the prefix is "centi", the base will be 10. - if the prefix is "gibi", the base will be 1024.- Status:
- Stable ICU 69.
-
getPower
public int getPower()Returns the power of the prefix. For example: - if the prefix is "centi", the power will be -2. - if the prefix is "gibi", the power will be 3 (for base 1024).- Status:
- Stable ICU 69.
-