public static enum MeasureUnit.Complexity extends Enum<MeasureUnit.Complexity>
- SINGLE: A single unit, optionally with a power and/or SI prefix. Examples: hectare, square-kilometer, kilojoule, one-per-second. - 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 SI prefix of a compound unit.
| Enum Constant and Description |
|---|
COMPOUND
A compound unit, like meter-per-second.
|
MIXED
A mixed unit, like hour-and-minute.
|
SINGLE
A single unit, like kilojoule.
|
| Modifier and Type | Method and Description |
|---|---|
static MeasureUnit.Complexity |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static MeasureUnit.Complexity[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final MeasureUnit.Complexity SINGLE
public static final MeasureUnit.Complexity COMPOUND
public static final MeasureUnit.Complexity MIXED
public static MeasureUnit.Complexity[] values()
for (MeasureUnit.Complexity c : MeasureUnit.Complexity.values()) System.out.println(c);
public static MeasureUnit.Complexity valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullCopyright © 2016 Unicode, Inc. and others.