类 Latitude27
java.lang.Object
net.sf.marineapi.ais.util.Latitude27
Checks a 27-bit signed integer latitude value for validity.
- 作者:
- Lázár József
-
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static booleanisAvailable(int value) Tells if the given latitude 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 latitude value (in 1/10000 minutes) to degrees.static StringtoString(int value) Returns the String representation of given latitude value.
-
字段详细资料
-
RANGE
Valid range with default value for "no value"- 另请参阅:
-
-
构造器详细资料
-
Latitude27
public Latitude27()
-
-
方法详细资料
-
toDegrees
public static double toDegrees(int value) Converts the latitude value (in 1/10000 minutes) to degrees.- 参数:
value- Int value to convert- 返回:
- The latitude value in degrees
-
isAvailable
public static boolean isAvailable(int value) Tells if the given latitude is available, i.e. within expected range.- 参数:
value- Latitude 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- Latitude value to validate- 返回:
trueif correct, otherwisefalse.
-
toString
Returns the String representation of given latitude value.- 参数:
value- Value to stringify- 返回:
- "invalid latitude", "latitude not available" or value formatted in degrees.
-