Class Coordinate

java.lang.Object
com.github.prominence.openweathermap.api.model.Coordinate

public class Coordinate extends Object
Represents some location by its latitude and longitude.
  • Method Details

    • of

      public static Coordinate of(double latitude, double longitude)
      Method for Coordinate creation with correctness check.
      Parameters:
      latitude - latitude
      longitude - 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

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object