Class Coordinate
java.lang.Object
com.github.prominence.openweathermap.api.model.Coordinate
Represents some location by its latitude and longitude.
-
Method Summary
Modifier and TypeMethodDescriptionbooleandoubleReturns latitude.doubleReturns longitude.inthashCode()static Coordinateof(double latitude, double longitude) Method forCoordinatecreation with correctness check.voidsetLatitude(double latitude) Sets latitude with checks.voidsetLongitude(double longitude) Sets longitude with checks.toString()
-
Method Details
-
of
Method forCoordinatecreation with correctness check.- Parameters:
latitude- latitudelongitude- longitude- Returns:
- coordinate object.
-
setLatitude
public void setLatitude(double latitude) Sets latitude with checks.- Parameters:
latitude- latitude value
-
setLongitude
public void setLongitude(double longitude) Sets longitude with checks.- Parameters:
longitude- longitude value
-
getLatitude
public double getLatitude()Returns latitude.- Returns:
- latitude
-
getLongitude
public double getLongitude()Returns longitude.- Returns:
- longitude
-
equals
-
hashCode
-
toString
-