|
Groovy Documentation | |||||||
| FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.jdesktop.swingx.mapviewer.GeoPosition
public class GeoPosition extends Object
An immutable coordinate in the real (geographic) world, composed of a latitude and a longitude.
| Field Summary | |
|---|---|
private double |
latitude
|
private double |
longitude
|
| Constructor Summary | |
GeoPosition(double latitude, double longitude)
Creates a new instance of GeoPosition from the specified latitude and longitude. |
|
GeoPosition(double[] coords)
Creates a new instance of GeoPosition from the specified latitude and longitude as an array of two doubles, with the latitude first. |
|
GeoPosition(double latDegrees, double latMinutes, double latSeconds, double lonDegrees, double lonMinutes, double lonSeconds)
Creates a new instance of GeoPosition from the specified latitude and longitude. |
|
| Method Summary | |
|---|---|
boolean
|
equals(Object obj)
Returns true the specified GeoPosition and this GeoPosition represent the exact same latitude and longitude coordinates. |
double
|
getLatitude()
Get the latitude as decimal degrees |
double
|
getLongitude()
Get the longitude as decimal degrees |
String
|
toString()
{@inheritDoc} @return |
| Methods inherited from class Object | |
|---|---|
| wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll |
| Field Detail |
|---|
private double latitude
private double longitude
| Constructor Detail |
|---|
public GeoPosition(double latitude, double longitude)
latitude - a latitude value in decmial degreeslongitude - a longitude value in decimal degrees
public GeoPosition(double[] coords)
coords - latitude and longitude as a double array of length two
public GeoPosition(double latDegrees, double latMinutes, double latSeconds, double lonDegrees, double lonMinutes, double lonSeconds)
latDegrees - the degrees part of the current latitudelatMinutes - the minutes part of the current latitudelatSeconds - the seconds part of the current latitudelonDegrees - the degrees part of the current longitudelonMinutes - the minutes part of the current longitudelonSeconds - the seconds part of the current longitude
| Method Detail |
|---|
public boolean equals(Object obj)
obj - a GeoPosition to compare this GeoPosition to
public double getLatitude()
public double getLongitude()
public String toString()
Groovy Documentation