public class Position
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private double |
latitude |
private double |
longitude |
private static int |
MAX_LATITUDE |
private static int |
MAX_LONGITUDE |
private static int |
MIN_LATITUDE |
private static int |
MIN_LONGITUDE |
Constructor and Description |
---|
Position(double latitude,
double longitude) |
Position(Position position) |
Modifier and Type | Method and Description |
---|---|
static boolean |
areCoordinatesValid(double latitude,
double longitude)
Checks if the coordinates are valid.
|
boolean |
equals(java.lang.Object o) |
double |
getLatitude() |
double |
getLongitude() |
int |
hashCode() |
private static final int MAX_LATITUDE
private static final int MIN_LATITUDE
private static final int MAX_LONGITUDE
private static final int MIN_LONGITUDE
private double latitude
private double longitude
public Position(double latitude, double longitude)
public Position(Position position)
public static boolean areCoordinatesValid(double latitude, double longitude)
latitude
- longitude
- public double getLatitude()
public double getLongitude()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object