public class Location extends Point2D implements Key
Point2D.Double, Point2D.Float| コンストラクタと説明 |
|---|
Location(double x,
double y)
Constructs and initializes a
Location with
the specified coordinates. |
| 修飾子とタイプ | メソッドと説明 |
|---|---|
double |
getLatitude()
Returns the latitude of this
Location. |
static Location |
getLocation(String exp) |
double |
getLongitude()
Returns the longitude of this
Location. |
static Location |
getUndef()
Returns the undefined location.
|
double |
getX() |
double |
getY() |
boolean |
isUNDEF()
Tests whether this
Location is undefined. |
void |
setLocation(double x,
double y)
Sets the location of this
Location to the
specified coordinates. |
String |
toString()
Returns a
String that represents the value
of this Location. |
clone, distance, distance, distance, distanceSq, distanceSq, distanceSq, equals, hashCode, setLocationpublic Location(double x,
double y)
throws IllegalArgumentException
Location with
the specified coordinates.x - the longitude of the newly
constructed Locationy - the latitude of the newly
constructed LocationIllegalArgumentException - an exception that occurs when the argument is out of range.public static Location getUndef()
public boolean isUNDEF()
Location is undefined.Location is undefined; false otherwise.public void setLocation(double x,
double y)
throws IllegalArgumentException,
UnsupportedOperationException
Location to the
specified coordinates.
Note that if this Location is undefined,
an UnsupportedOperationException will be thrown.setLocation クラス内 Point2Dx - the new longitude of this Locationy - the new latitude of this LocationIllegalArgumentException - if x is invalid longitude or y is invalid latitude.UnsupportedOperationException - if this Location is undefined.public double getLatitude()
Location.Location.public double getLongitude()
Location.Location.Copyright © 2017. All rights reserved.