パッケージ org.piax.common

クラス Location

java.lang.Object
java.awt.geom.Point2D
org.piax.common.Location
すべての実装されたインタフェース:
Serializable, Cloneable, Destination, Key

public class Location
extends Point2D
implements Key
This class represents the location of a geographical point. This consists of the latitude and the longitude data which have the unit of the degree.
関連項目:
直列化された形式
  • コンストラクタの詳細

    • Location

      public Location​(double x, double y) throws IllegalArgumentException
      Constructs and initializes a Location with the specified coordinates.
      パラメータ:
      x - the longitude of the newly constructed Location
      y - the latitude of the newly constructed Location
      例外:
      IllegalArgumentException - an exception that occurs when the argument is out of range.
  • メソッドの詳細

    • getUndef

      public static Location getUndef()
      Returns the undefined location.
      戻り値:
      the undefined location.
    • getLocation

      public static Location getLocation​(String exp)
    • isUNDEF

      public boolean isUNDEF()
      Tests whether this Location is undefined.
      戻り値:
      true if this Location is undefined; false otherwise.
    • setLocation

      public void setLocation​(double x, double y) throws IllegalArgumentException, UnsupportedOperationException
      Sets the location of this Location to the specified coordinates. Note that if this Location is undefined, an UnsupportedOperationException will be thrown.
      定義:
      setLocation クラス内 Point2D
      パラメータ:
      x - the new longitude of this Location
      y - the new latitude of this Location
      例外:
      IllegalArgumentException - if x is invalid longitude or y is invalid latitude.
      UnsupportedOperationException - if this Location is undefined.
    • getLatitude

      public double getLatitude()
      Returns the latitude of this Location.
      戻り値:
      the latitude of this Location.
    • getLongitude

      public double getLongitude()
      Returns the longitude of this Location.
      戻り値:
      the longitude of this Location.
    • getX

      public double getX()
      定義:
      getX クラス内 Point2D
    • getY

      public double getY()
      定義:
      getY クラス内 Point2D
    • toString

      public String toString()
      Returns a String that represents the value of this Location.
      オーバーライド:
      toString クラス内 Object
      戻り値:
      a string representation of this Location.