Package ucar.nc2.dt.ugrid.utils
Enum AsaUnits.SpeedType
- java.lang.Object
-
- java.lang.Enum<AsaUnits.SpeedType>
-
- ucar.nc2.dt.ugrid.utils.AsaUnits.SpeedType
-
- All Implemented Interfaces:
Serializable,Comparable<AsaUnits.SpeedType>
- Enclosing class:
- AsaUnits
public static enum AsaUnits.SpeedType extends Enum<AsaUnits.SpeedType>
Enumeration used in converting between different speed units. Meters are used as a conversion base.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CENTIMETERS_SECKILOMETERS_HOURKNOTSMETERS_SECMILES_HOURMILLIMETERS_SECUNKNOWN
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description doubleconvertFromMeters(double n)doubleconvertToMeters(double n)StringgetDisplayName()static AsaUnits.SpeedTypegetSpeedType(String string)StringtoString()static AsaUnits.SpeedTypevalueOf(String name)Returns the enum constant of this type with the specified name.static AsaUnits.SpeedType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
UNKNOWN
public static final AsaUnits.SpeedType UNKNOWN
-
KNOTS
public static final AsaUnits.SpeedType KNOTS
-
METERS_SEC
public static final AsaUnits.SpeedType METERS_SEC
-
MILLIMETERS_SEC
public static final AsaUnits.SpeedType MILLIMETERS_SEC
-
CENTIMETERS_SEC
public static final AsaUnits.SpeedType CENTIMETERS_SEC
-
MILES_HOUR
public static final AsaUnits.SpeedType MILES_HOUR
-
KILOMETERS_HOUR
public static final AsaUnits.SpeedType KILOMETERS_HOUR
-
-
Method Detail
-
values
public static AsaUnits.SpeedType[] 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 (AsaUnits.SpeedType c : AsaUnits.SpeedType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static AsaUnits.SpeedType valueOf(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:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
convertToMeters
public double convertToMeters(double n)
- Returns:
- the number of meters equal to
nwhennis in the units specified by this enumeration
-
convertFromMeters
public double convertFromMeters(double n)
- Returns:
- a number in the units specified by this enumeration equal to
nmeters
-
getDisplayName
public String getDisplayName()
-
toString
public String toString()
- Overrides:
toStringin classEnum<AsaUnits.SpeedType>
-
getSpeedType
public static AsaUnits.SpeedType getSpeedType(String string)
-
-