Added in API level 34

MeasurePrefix


class MeasurePrefix
kotlin.Any
   ↳ kotlin.Enum<android.icu.util.MeasureUnit.MeasurePrefix>
   ↳ android.icu.util.MeasureUnit.MeasurePrefix

Enumeration for SI and binary prefixes, e.g. "kilo-", "nano-", "mebi-".

Summary

Enum values

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.

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.

Public methods
Int

Returns the base of the prefix.

Int

Returns the power of the prefix.

Enum values

ATTO

Added in API level 34
enum val ATTO : MeasureUnit.MeasurePrefix

SI prefix: atto, 10^-18.

CENTI

Added in API level 34
enum val CENTI : MeasureUnit.MeasurePrefix

SI prefix: centi, 10^-2.

DECI

Added in API level 34
enum val DECI : MeasureUnit.MeasurePrefix

SI prefix: deci, 10^-1.

DEKA

Added in API level 34
enum val DEKA : MeasureUnit.MeasurePrefix

SI prefix: deka, 10^1.

EXA

Added in API level 34
enum val EXA : MeasureUnit.MeasurePrefix

SI prefix: exa, 10^18.

EXBI

Added in API level 34
enum val EXBI : MeasureUnit.MeasurePrefix

IEC binary prefix: exbi, 1024^6.

FEMTO

Added in API level 34
enum val FEMTO : MeasureUnit.MeasurePrefix

SI prefix: femto, 10^-15.

GIBI

Added in API level 34
enum val GIBI : MeasureUnit.MeasurePrefix

IEC binary prefix: gibi, 1024^3.

GIGA

Added in API level 34
enum val GIGA : MeasureUnit.MeasurePrefix

SI prefix: giga, 10^9.

HECTO

Added in API level 34
enum val HECTO : MeasureUnit.MeasurePrefix

SI prefix: hecto, 10^2.

KIBI

Added in API level 34
enum val KIBI : MeasureUnit.MeasurePrefix

IEC binary prefix: kibi, 1024^1.

KILO

Added in API level 34
enum val KILO : MeasureUnit.MeasurePrefix

SI prefix: kilo, 10^3.

MEBI

Added in API level 34
enum val MEBI : MeasureUnit.MeasurePrefix

IEC binary prefix: mebi, 1024^2.

MEGA

Added in API level 34
enum val MEGA : MeasureUnit.MeasurePrefix

SI prefix: mega, 10^6.

MICRO

Added in API level 34
enum val MICRO : MeasureUnit.MeasurePrefix

SI prefix: micro, 10^-6.

MILLI

Added in API level 34
enum val MILLI : MeasureUnit.MeasurePrefix

SI prefix: milli, 10^-3.

NANO

Added in API level 34
enum val NANO : MeasureUnit.MeasurePrefix

SI prefix: nano, 10^-9.

ONE

Added in API level 34
enum val ONE : MeasureUnit.MeasurePrefix

The absence of an SI prefix.

PEBI

Added in API level 34
enum val PEBI : MeasureUnit.MeasurePrefix

IEC binary prefix: pebi, 1024^5.

PETA

Added in API level 34
enum val PETA : MeasureUnit.MeasurePrefix

SI prefix: peta, 10^15.

PICO

Added in API level 34
enum val PICO : MeasureUnit.MeasurePrefix

SI prefix: pico, 10^-12.

TEBI

Added in API level 34
enum val TEBI : MeasureUnit.MeasurePrefix

IEC binary prefix: tebi, 1024^4.

TERA

Added in API level 34
enum val TERA : MeasureUnit.MeasurePrefix

SI prefix: tera, 10^12.

YOBI

Added in API level 34
enum val YOBI : MeasureUnit.MeasurePrefix

IEC binary prefix: yobi, 1024^8.

YOCTO

Added in API level 34
enum val YOCTO : MeasureUnit.MeasurePrefix

SI prefix: yocto, 10^-24.

YOTTA

Added in API level 34
enum val YOTTA : MeasureUnit.MeasurePrefix

SI prefix: yotta, 10^24.

ZEBI

Added in API level 34
enum val ZEBI : MeasureUnit.MeasurePrefix

IEC binary prefix: zebi, 1024^7.

ZEPTO

Added in API level 34
enum val ZEPTO : MeasureUnit.MeasurePrefix

SI prefix: zepto, 10^-21.

ZETTA

Added in API level 34
enum val ZETTA : MeasureUnit.MeasurePrefix

SI prefix: zetta, 10^21.

Public methods

getBase

Added in API level 34
fun getBase(): Int

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

Added in API level 34
fun getPower(): Int

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).