Package com.ibm.icu.util
Enum MeasureUnit.MeasurePrefix
- java.lang.Object
-
- java.lang.Enum<MeasureUnit.MeasurePrefix>
-
- com.ibm.icu.util.MeasureUnit.MeasurePrefix
-
- All Implemented Interfaces:
Serializable
,Comparable<MeasureUnit.MeasurePrefix>
- Enclosing class:
- MeasureUnit
public static enum MeasureUnit.MeasurePrefix extends Enum<MeasureUnit.MeasurePrefix>
Enumeration for SI and binary prefixes, e.g. "kilo-", "nano-", "mebi-".- Status:
- Stable ICU 69.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ATTO
SI prefix: atto, 10^-18.CENTI
SI prefix: centi, 10^-2.DECI
SI prefix: deci, 10^-1.DEKA
SI prefix: deka, 10^1.EXA
SI prefix: exa, 10^18.EXBI
IEC binary prefix: exbi, 1024^6.FEMTO
SI prefix: femto, 10^-15.GIBI
IEC binary prefix: gibi, 1024^3.GIGA
SI prefix: giga, 10^9.HECTO
SI prefix: hecto, 10^2.KIBI
IEC binary prefix: kibi, 1024^1.KILO
SI prefix: kilo, 10^3.MEBI
IEC binary prefix: mebi, 1024^2.MEGA
SI prefix: mega, 10^6.MICRO
SI prefix: micro, 10^-6.MILLI
SI prefix: milli, 10^-3.NANO
SI prefix: nano, 10^-9.ONE
The absence of an SI prefix.PEBI
IEC binary prefix: pebi, 1024^5.PETA
SI prefix: peta, 10^15.PICO
SI prefix: pico, 10^-12.QUECTO
SI prefix: quecto, 10^-30.QUETTA
SI prefix: quetta, 10^30.RONNA
SI prefix: ronna, 10^27.RONTO
SI prefix: ronto, 10^-27.TEBI
IEC binary prefix: tebi, 1024^4.TERA
SI prefix: tera, 10^12.YOBI
IEC binary prefix: yobi, 1024^8.YOCTO
SI prefix: yocto, 10^-24.YOTTA
SI prefix: yotta, 10^24.ZEBI
IEC binary prefix: zebi, 1024^7.ZEPTO
SI prefix: zepto, 10^-21.ZETTA
SI prefix: zetta, 10^21.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description int
getBase()
Returns the base of the prefix.String
getIdentifier()
Deprecated.This API is ICU internal only.int
getPower()
Returns the power of the prefix.static MeasureUnit.MeasurePrefix
valueOf(String name)
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 Detail
-
QUETTA
public static final MeasureUnit.MeasurePrefix QUETTA
SI prefix: quetta, 10^30.- Status:
- Stable ICU 75.
-
RONNA
public static final MeasureUnit.MeasurePrefix RONNA
SI prefix: ronna, 10^27.- Status:
- Stable ICU 75.
-
YOTTA
public static final MeasureUnit.MeasurePrefix YOTTA
SI prefix: yotta, 10^24.- Status:
- Stable ICU 69.
-
ZETTA
public static final MeasureUnit.MeasurePrefix ZETTA
SI prefix: zetta, 10^21.- Status:
- Stable ICU 69.
-
EXA
public static final MeasureUnit.MeasurePrefix EXA
SI prefix: exa, 10^18.- Status:
- Stable ICU 69.
-
PETA
public static final MeasureUnit.MeasurePrefix PETA
SI prefix: peta, 10^15.- Status:
- Stable ICU 69.
-
TERA
public static final MeasureUnit.MeasurePrefix TERA
SI prefix: tera, 10^12.- Status:
- Stable ICU 69.
-
GIGA
public static final MeasureUnit.MeasurePrefix GIGA
SI prefix: giga, 10^9.- Status:
- Stable ICU 69.
-
MEGA
public static final MeasureUnit.MeasurePrefix MEGA
SI prefix: mega, 10^6.- Status:
- Stable ICU 69.
-
KILO
public static final MeasureUnit.MeasurePrefix KILO
SI prefix: kilo, 10^3.- Status:
- Stable ICU 69.
-
HECTO
public static final MeasureUnit.MeasurePrefix HECTO
SI prefix: hecto, 10^2.- Status:
- Stable ICU 69.
-
DEKA
public static final MeasureUnit.MeasurePrefix DEKA
SI prefix: deka, 10^1.- Status:
- Stable ICU 69.
-
ONE
public static final MeasureUnit.MeasurePrefix ONE
The absence of an SI prefix.- Status:
- Stable ICU 69.
-
DECI
public static final MeasureUnit.MeasurePrefix DECI
SI prefix: deci, 10^-1.- Status:
- Stable ICU 69.
-
CENTI
public static final MeasureUnit.MeasurePrefix CENTI
SI prefix: centi, 10^-2.- Status:
- Stable ICU 69.
-
MILLI
public static final MeasureUnit.MeasurePrefix MILLI
SI prefix: milli, 10^-3.- Status:
- Stable ICU 69.
-
MICRO
public static final MeasureUnit.MeasurePrefix MICRO
SI prefix: micro, 10^-6.- Status:
- Stable ICU 69.
-
NANO
public static final MeasureUnit.MeasurePrefix NANO
SI prefix: nano, 10^-9.- Status:
- Stable ICU 69.
-
PICO
public static final MeasureUnit.MeasurePrefix PICO
SI prefix: pico, 10^-12.- Status:
- Stable ICU 69.
-
FEMTO
public static final MeasureUnit.MeasurePrefix FEMTO
SI prefix: femto, 10^-15.- Status:
- Stable ICU 69.
-
ATTO
public static final MeasureUnit.MeasurePrefix ATTO
SI prefix: atto, 10^-18.- Status:
- Stable ICU 69.
-
ZEPTO
public static final MeasureUnit.MeasurePrefix ZEPTO
SI prefix: zepto, 10^-21.- Status:
- Stable ICU 69.
-
YOCTO
public static final MeasureUnit.MeasurePrefix YOCTO
SI prefix: yocto, 10^-24.- Status:
- Stable ICU 69.
-
RONTO
public static final MeasureUnit.MeasurePrefix RONTO
SI prefix: ronto, 10^-27.- Status:
- Stable ICU 75.
-
QUECTO
public static final MeasureUnit.MeasurePrefix QUECTO
SI prefix: quecto, 10^-30.- Status:
- Stable ICU 75.
-
KIBI
public static final MeasureUnit.MeasurePrefix KIBI
IEC binary prefix: kibi, 1024^1.- Status:
- Stable ICU 69.
-
MEBI
public static final MeasureUnit.MeasurePrefix MEBI
IEC binary prefix: mebi, 1024^2.- Status:
- Stable ICU 69.
-
GIBI
public static final MeasureUnit.MeasurePrefix GIBI
IEC binary prefix: gibi, 1024^3.- Status:
- Stable ICU 69.
-
TEBI
public static final MeasureUnit.MeasurePrefix TEBI
IEC binary prefix: tebi, 1024^4.- Status:
- Stable ICU 69.
-
PEBI
public static final MeasureUnit.MeasurePrefix PEBI
IEC binary prefix: pebi, 1024^5.- Status:
- Stable ICU 69.
-
EXBI
public static final MeasureUnit.MeasurePrefix EXBI
IEC binary prefix: exbi, 1024^6.- Status:
- Stable ICU 69.
-
ZEBI
public static final MeasureUnit.MeasurePrefix ZEBI
IEC binary prefix: zebi, 1024^7.- Status:
- Stable ICU 69.
-
YOBI
public static final MeasureUnit.MeasurePrefix YOBI
IEC binary prefix: yobi, 1024^8.- Status:
- Stable ICU 69.
-
-
Method Detail
-
values
public static MeasureUnit.MeasurePrefix[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (MeasureUnit.MeasurePrefix c : MeasureUnit.MeasurePrefix.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static MeasureUnit.MeasurePrefix valueOf(String name)
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 public String 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.
-
-