|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jdesktop.swingx.mapviewer.GeoPosition
public class GeoPosition
An immutable coordinate in the real (geographic) world, composed of a latitude and a longitude.
| Constructor Summary | |
|---|---|
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 latitude,
double longitude)
Creates a new instance of GeoPosition from the specified latitude and longitude. |
|
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()
Returns a string representation of the object. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public GeoPosition(double latitude,
double longitude)
latitude - a latitude value in decmial degreeslongitude - a longitude value in decimal degreespublic 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 double getLatitude()
public double getLongitude()
public boolean equals(Object obj)
equals in class Objectobj - a GeoPosition to compare this GeoPosition to
Object.hashCode(),
Hashtablepublic String toString()
toString method returns a string that
"textually represents" this object. The result should
be a concise but informative representation that is easy for a
person to read.
It is recommended that all subclasses override this method.
The toString method for class Object
returns a string consisting of the name of the class of which the
object is an instance, the at-sign character `@', and
the unsigned hexadecimal representation of the hash code of the
object. In other words, this method returns a string equal to the
value of:
getClass().getName() + '@' + Integer.toHexString(hashCode())
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||