MeasureUnit.Complexity


public static final enum MeasureUnit.Complexity
extends Enum<MeasureUnit.Complexity>

java.lang.Object
   ↳ java.lang.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

MeasureUnit.Complexity  COMPOUND

A compound unit, like meter-per-second. 

MeasureUnit.Complexity  MIXED

A mixed unit, like hour-and-minute. 

MeasureUnit.Complexity  SINGLE

A single unit, like kilojoule. 

Public methods

static MeasureUnit.Complexity valueOf(String name)
static final Complexity[] values()

Inherited methods

Enum values

COMPOUND

Added in API level 33
public static final MeasureUnit.Complexity COMPOUND

A compound unit, like meter-per-second.

MIXED

Added in API level 33
public static final MeasureUnit.Complexity MIXED

A mixed unit, like hour-and-minute.

SINGLE

Added in API level 33
public static final MeasureUnit.Complexity SINGLE

A single unit, like kilojoule.

Public methods

valueOf

public static MeasureUnit.Complexity valueOf (String name)

Parameters
name String

Returns
MeasureUnit.Complexity

values

public static final Complexity[] values ()

Returns
Complexity[]