public static enum Distance.LinearUnit extends Enum<Distance.LinearUnit>
| Enum Constant and Description |
|---|
FOOT_U_S |
KILOMETER |
METER |
MILE |
NAUTICAL_MILE |
YARD |
| Modifier and Type | Method and Description |
|---|---|
static Distance.LinearUnit |
fromString(String enumValueString)
Returns the
Distance.LinearUnit enum constant corresponding to the string
provided. |
static Distance.LinearUnit |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Distance.LinearUnit[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Distance.LinearUnit METER
public static final Distance.LinearUnit KILOMETER
public static final Distance.LinearUnit NAUTICAL_MILE
public static final Distance.LinearUnit MILE
public static final Distance.LinearUnit FOOT_U_S
public static final Distance.LinearUnit YARD
public static Distance.LinearUnit[] values()
for (Distance.LinearUnit c : Distance.LinearUnit.values()) System.out.println(c);
public static Distance.LinearUnit 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 nullpublic static Distance.LinearUnit fromString(String enumValueString)
Distance.LinearUnit enum constant corresponding to the string
provided. It should be used as a replacement for the default valueOf() method.
This method supports all the string representations provided when the enum constants are
created. As opposed to valueOf(), this method is case-insensitive and will for
instance work with nauticalmile, NAUTICALMILE and nauticalMile.
enumValueString - string representing the enum constant to return. Cannot be null or empty.IllegalArgumentException - thrown if the string provided doesn't map to any enum
constant, is null or emptyThis work is licensed under a Creative Commons Attribution 4.0 International License.