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-".
Author:
Alan Liu
Status:
Stable ICU 69.
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    SI 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 Type
    Method
    Description
    int
    Returns the base of the prefix.
    Deprecated.
    This API is ICU internal only.
    int
    Returns the power of the prefix.
    Returns the enum constant of this type with the specified name.
    Returns an array containing the constants of this enum type, in the order they are declared.

    Methods inherited from class Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

  • Method Details

    • values

      public static MeasureUnit.MeasurePrefix[] 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

      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 name
      NullPointerException - 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.