|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Object java.lang.Enum<Length> com.bbn.openmap.proj.Length
public enum Length
Length is a convenience class used for a couple of things. It can be used to specify unit type, and can be used for conversion from radians to/from whatever units are represented by the implemented class.
Enum Constant Summary | |
---|---|
DECIMAL_DEGREE
Decimal Degrees, in WGS 84 Spherical earth model units. |
|
DM
Data Mile, in WGS 84 spherical earth model units. |
|
FEET
Feet, in WGS 84 spherical earth model units. |
|
KM
Kilometers, in WGS 84 Spherical earth model units. |
|
METER
Meters, in WGS 84 Spherical earth model units. |
|
MILE
Miles, in WGS 84 spherical earth model units. |
|
NM
Nautical Miles, in WGS 84 Spherical earth model units. |
|
RADIAN
Radians, in terms of a spherical earth. |
|
YARD
Feet, in WGS 84 spherical earth model units. |
Field Summary | |
---|---|
protected java.lang.String |
abbr
|
protected double |
constant
Unit/radians |
protected I18n |
i18n
|
protected java.lang.String |
name
|
protected double |
unitEquatorCircumference
|
Method Summary | |
---|---|
double |
fromRadians(double numRadians)
Given a number of radians, convert to the number of units represented by this length. |
float |
fromRadians(float numRadians)
Given a number of radians, convert to the number of units represented by this length. |
static Length |
get(java.lang.String name)
Get the Length object with the given name or abbreviation. |
java.lang.String |
getAbbr()
Return the abbreviation for this length type. |
double |
toRadians(double numUnits)
|
float |
toRadians(float numUnits)
Given a number of units provided by this Length, convert to a number of radians. |
java.lang.String |
toString()
Return the name for this length type. |
static Length |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. |
static Length[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
Methods inherited from class java.lang.Enum |
---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
public static final Length MILE
public static final Length FEET
public static final Length YARD
public static final Length METER
public static final Length KM
public static final Length NM
public static final Length DECIMAL_DEGREE
public static final Length DM
public static final Length RADIAN
Field Detail |
---|
protected final double constant
protected final java.lang.String name
protected final java.lang.String abbr
protected double unitEquatorCircumference
protected transient I18n i18n
Method Detail |
---|
public static Length[] values()
for (Length c : Length.values()) System.out.println(c);
public static Length 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 name
java.lang.NullPointerException
- if the argument is nullpublic float toRadians(float numUnits)
public double toRadians(double numUnits)
public float fromRadians(float numRadians)
public double fromRadians(double numRadians)
public java.lang.String toString()
toString
in class java.lang.Enum<Length>
public java.lang.String getAbbr()
public static Length get(java.lang.String name)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |