类 Longitude18

java.lang.Object
net.sf.marineapi.ais.util.Longitude18

public class Longitude18 extends Object
Checks a 18-bit signed integer longitude value for validity.
  • 字段概要

    字段
    修饰符和类型
    字段
    说明
    static final String
    The range of valid longitude values with default for "no value".
  • 构造器概要

    构造器
    构造器
    说明
     
  • 方法概要

    修饰符和类型
    方法
    说明
    static boolean
    isAvailable(int value)
    Tells if the given longitude is available, i.e. within expected range.
    static boolean
    isCorrect(int value)
    Tells if the given value is correct, i.e. within expected range and not the no-value.
    static double
    toDegrees(int value)
    Converts the longitude value (in 1/10 minutes) to degrees.
    static String
    toString(int value)
    Returns the string representation of given longitude value.

    从类继承的方法 java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 字段详细资料

    • RANGE

      public static final String 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
      返回:
      true if available, otherwise false.
    • 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
      返回:
      true if correct, otherwise false.
    • toString

      public static String toString(int value)
      Returns the string representation of given longitude value.
      参数:
      value - Value to stringify
      返回:
      formatted value, "invalid longitude" or "longitude not available"