Package com.ibm.icu.util
Enum MeasureUnit.Complexity
- java.lang.Object
-
- java.lang.Enum<MeasureUnit.Complexity>
-
- com.ibm.icu.util.MeasureUnit.Complexity
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<MeasureUnit.Complexity>
- Enclosing class:
- MeasureUnit
public static enum MeasureUnit.Complexity extends java.lang.Enum<MeasureUnit.Complexity>
Enumeration for unit complexity. There are three levels:- 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.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static MeasureUnit.Complexity
valueOf(java.lang.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.
-
-
-
Enum Constant Detail
-
SINGLE
public static final MeasureUnit.Complexity SINGLE
A single unit, like kilojoule.
-
COMPOUND
public static final MeasureUnit.Complexity COMPOUND
A compound unit, like meter-per-second.
-
MIXED
public static final MeasureUnit.Complexity MIXED
A mixed unit, like hour-and-minute.
-
-
Method Detail
-
values
public static MeasureUnit.Complexity[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (MeasureUnit.Complexity c : MeasureUnit.Complexity.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static MeasureUnit.Complexity valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
-