public class Coordinate
extends java.lang.Object
| Constructor and Description |
|---|
Coordinate(double latitude,
double longitude)
Default constructor
|
| Modifier and Type | Method and Description |
|---|---|
double |
getLatitude()
Returns the coordinate's latitude
|
double |
getLongitude()
Returns the coordinate's longitude
|
java.lang.String |
toString() |
public Coordinate(double latitude,
double longitude)
throws java.lang.IllegalArgumentException
latitude - The coordinate's latitude (must be between -180 and 180)longitude - The coordinate's longitude (must be between -90 and 90)java.lang.IllegalArgumentException - When an invalid latitude or longitude was passedpublic double getLatitude()
public double getLongitude()
public java.lang.String toString()
toString in class java.lang.Object