Package com.ibm.icu.util
Enum MeasureUnit.MeasurePrefix
- All Implemented Interfaces:
Serializable
,Comparable<MeasureUnit.MeasurePrefix>
,java.lang.constant.Constable
- Enclosing class:
MeasureUnit
Enumeration for SI and binary prefixes, e.g. "kilo-", "nano-", "mebi-".
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
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.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 TypeMethodDescriptionint
getBase()
Returns the base of the prefix.Deprecated.This API is ICU internal only.int
getPower()
Returns the power of the prefix.static MeasureUnit.MeasurePrefix
Returns 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
-
YOTTA
SI prefix: yotta, 10^24. -
ZETTA
SI prefix: zetta, 10^21. -
EXA
SI prefix: exa, 10^18. -
PETA
SI prefix: peta, 10^15. -
TERA
SI prefix: tera, 10^12. -
GIGA
SI prefix: giga, 10^9. -
MEGA
SI prefix: mega, 10^6. -
KILO
SI prefix: kilo, 10^3. -
HECTO
SI prefix: hecto, 10^2. -
DEKA
SI prefix: deka, 10^1. -
ONE
The absence of an SI prefix. -
DECI
SI prefix: deci, 10^-1. -
CENTI
SI prefix: centi, 10^-2. -
MILLI
SI prefix: milli, 10^-3. -
MICRO
SI prefix: micro, 10^-6. -
NANO
SI prefix: nano, 10^-9. -
PICO
SI prefix: pico, 10^-12. -
FEMTO
SI prefix: femto, 10^-15. -
ATTO
SI prefix: atto, 10^-18. -
ZEPTO
SI prefix: zepto, 10^-21. -
YOCTO
SI prefix: yocto, 10^-24. -
KIBI
IEC binary prefix: kibi, 1024^1. -
MEBI
IEC binary prefix: mebi, 1024^2. -
GIBI
IEC binary prefix: gibi, 1024^3. -
TEBI
IEC binary prefix: tebi, 1024^4. -
PEBI
IEC binary prefix: pebi, 1024^5. -
EXBI
IEC binary prefix: exbi, 1024^6. -
ZEBI
IEC binary prefix: zebi, 1024^7. -
YOBI
IEC binary prefix: yobi, 1024^8.
-
-
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. -
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. -
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).
-