public enum LinearUnits extends Enum<LinearUnits>
Modifier and Type | Method and Description |
---|---|
double |
fromMeters(double value)
Convert a value specified in meters to the unit system indicated
by this enumeration instance.
|
String |
getAbbreviation()
Get the abbreviation for the unit of measure.
|
String |
getName()
Gets the name of the units in a form suitable for user interface display.
|
double |
toMeters(double value)
Convert the specified value to meters.
|
static LinearUnits |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static LinearUnits[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final LinearUnits UNKNOWN
public static final LinearUnits METERS
public static final LinearUnits FEET
public static final LinearUnits FATHOMS
public static LinearUnits[] values()
for (LinearUnits c : LinearUnits.values()) System.out.println(c);
public static LinearUnits 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 String getAbbreviation()
public double toMeters(double value)
value
- a valid numeric value in the system of units specified
by the enumeration instancepublic double fromMeters(double value)
value
- a value in meterspublic String getName()
Copyright © 2021. All rights reserved.