Added in API level 33

Complexity


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

Enumeration for unit complexity. There are three levels:

  • SINGLE: A single unit, optionally with a power and/or SI or binary prefix. Examples: hectare, square-kilometer, kilojoule, per-second, mebibyte.
  • COMPOUND: A unit composed of the product of multiple single units. Examples: meter-per-second, kilowatt-hour, kilogram-meter-per-square-second.
  • MIXED: A unit composed of the sum of multiple single units. Examples: foot-and-inch, hour-and-minute-and-second, degree-and-arcminute-and-arcsecond.
The complexity determines which operations are available. For example, you cannot set the power or prefix of a compound unit.

Summary

Enum values

A compound unit, like meter-per-second.

A mixed unit, like hour-and-minute.

A single unit, like kilojoule.

Enum values

COMPOUND

Added in API level 33
enum val COMPOUND : MeasureUnit.Complexity

A compound unit, like meter-per-second.

MIXED

Added in API level 33
enum val MIXED : MeasureUnit.Complexity

A mixed unit, like hour-and-minute.

SINGLE

Added in API level 33
enum val SINGLE : MeasureUnit.Complexity

A single unit, like kilojoule.