パッケージ 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(double x, double y)Constructs and initializes aLocationwith the specified coordinates. -
メソッドの概要
修飾子とタイプ メソッド 説明 doublegetLatitude()Returns the latitude of thisLocation.static LocationgetLocation(String exp)doublegetLongitude()Returns the longitude of thisLocation.static LocationgetUndef()Returns the undefined location.doublegetX()doublegetY()booleanisUNDEF()Tests whether thisLocationis undefined.voidsetLocation(double x, double y)Sets the location of thisLocationto the specified coordinates.StringtoString()Returns aStringthat represents the value of thisLocation.クラスから継承されたメソッド java.awt.geom.Point2D
clone, distance, distance, distance, distanceSq, distanceSq, distanceSq, equals, hashCode, setLocation
-
コンストラクタの詳細
-
Location
Constructs and initializes aLocationwith the specified coordinates.- パラメータ:
x- the longitude of the newly constructedLocationy- the latitude of the newly constructedLocation- 例外:
IllegalArgumentException- an exception that occurs when the argument is out of range.
-
-
メソッドの詳細
-
getUndef
Returns the undefined location.- 戻り値:
- the undefined location.
-
getLocation
-
isUNDEF
public boolean isUNDEF()Tests whether thisLocationis undefined.- 戻り値:
- true if this
Locationis undefined; false otherwise.
-
setLocation
public void setLocation(double x, double y) throws IllegalArgumentException, UnsupportedOperationExceptionSets the location of thisLocationto the specified coordinates. Note that if thisLocationis undefined, anUnsupportedOperationExceptionwill be thrown.- 定義:
setLocationクラス内Point2D- パラメータ:
x- the new longitude of thisLocationy- the new latitude of thisLocation- 例外:
IllegalArgumentException- if x is invalid longitude or y is invalid latitude.UnsupportedOperationException- if thisLocationis undefined.
-
getLatitude
public double getLatitude()Returns the latitude of thisLocation.- 戻り値:
- the latitude of this
Location.
-
getLongitude
public double getLongitude()Returns the longitude of thisLocation.- 戻り値:
- the longitude of this
Location.
-
getX
public double getX() -
getY
public double getY() -
toString
Returns aStringthat represents the value of thisLocation.
-