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 |
getBase() Returns the base of the prefix. |
Int |
getPower() Returns the power of the prefix. |
Enum values
EXBI
enum val EXBI : MeasureUnit.MeasurePrefix
IEC binary prefix: exbi, 1024^6.
GIBI
enum val GIBI : MeasureUnit.MeasurePrefix
IEC binary prefix: gibi, 1024^3.
KIBI
enum val KIBI : MeasureUnit.MeasurePrefix
IEC binary prefix: kibi, 1024^1.
MEBI
enum val MEBI : MeasureUnit.MeasurePrefix
IEC binary prefix: mebi, 1024^2.
PEBI
enum val PEBI : MeasureUnit.MeasurePrefix
IEC binary prefix: pebi, 1024^5.
TEBI
enum val TEBI : MeasureUnit.MeasurePrefix
IEC binary prefix: tebi, 1024^4.
YOBI
enum val YOBI : MeasureUnit.MeasurePrefix
IEC binary prefix: yobi, 1024^8.
ZEBI
enum val ZEBI : MeasureUnit.MeasurePrefix
IEC binary prefix: zebi, 1024^7.
Public methods
getBase
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
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).