类 Longitude18
java.lang.Object
net.sf.marineapi.ais.util.Longitude18
Checks a 18-bit signed integer longitude value for validity.
-
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static booleanisAvailable(int value) Tells if the given longitude is available, i.e. within expected range.static booleanisCorrect(int value) Tells if the given value is correct, i.e. within expected range and not the no-value.static doubletoDegrees(int value) Converts the longitude value (in 1/10 minutes) to degrees.static StringtoString(int value) Returns the string representation of given longitude value.
-
字段详细资料
-
RANGE
The range of valid longitude values with default for "no value".- 另请参阅:
-
-
构造器详细资料
-
Longitude18
public Longitude18()
-
-
方法详细资料
-
toDegrees
public static double toDegrees(int value) Converts the longitude value (in 1/10 minutes) to degrees.- 参数:
value- Int value to convert- 返回:
- the longitude value in degrees
-
isAvailable
public static boolean isAvailable(int value) Tells if the given longitude is available, i.e. within expected range.- 参数:
value- Longitude value to validate- 返回:
trueif available, otherwisefalse.
-
isCorrect
public static boolean isCorrect(int value) Tells if the given value is correct, i.e. within expected range and not the no-value.- 参数:
value- Longitude value to validate- 返回:
trueif correct, otherwisefalse.
-
toString
Returns the string representation of given longitude value.- 参数:
value- Value to stringify- 返回:
- formatted value, "invalid longitude" or "longitude not available"
-