public enum MeasurementUnit extends java.lang.Enum<MeasurementUnit>
Enum Constant and Description |
---|
FOOT |
KILOMETER |
KILOMETERS_PER_HOUR |
METER |
METERS_PER_SECOND |
MILE |
MILES_PER_HOUR |
YARD |
Modifier and Type | Method and Description |
---|---|
Converter |
getConverter()
Returns a converter for this unit.
|
static MeasurementUnit |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static MeasurementUnit[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final MeasurementUnit METER
public static final MeasurementUnit KILOMETER
public static final MeasurementUnit YARD
public static final MeasurementUnit FOOT
public static final MeasurementUnit MILE
public static final MeasurementUnit METERS_PER_SECOND
public static final MeasurementUnit KILOMETERS_PER_HOUR
public static final MeasurementUnit MILES_PER_HOUR
public static MeasurementUnit[] values()
for (MeasurementUnit c : MeasurementUnit.values()) System.out.println(c);
public static MeasurementUnit valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null