All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.afrigis.services.Coordinate Maven / Gradle / Ivy

There is a newer version: 3.0.2
Show newest version
package com.afrigis.services;

/**
 * 

* Represents a decimal GPS coordinate. *

* * @author hendrikc * */ public class Coordinate { private Double latitude; private Double longitude; /** *

* Null constructor. *

*/ public Coordinate() { super(); } /** *

Constructor.

* @param latitudeIn the latitude * @param longitudeIn the longitude */ public Coordinate(Double latitudeIn, Double longitudeIn) { super(); this.latitude = latitudeIn; this.longitude = longitudeIn; } /** * * @return the decimal latitude of the coordinate. */ public Double getLatitude() { return latitude; } /** *

* Sets the decimal latitude. *

* @param latitudeIn the decimal latitude */ public final void setLatitude(Double latitudeIn) { this.latitude = latitudeIn; } /** *

* Sets the decimal longitude. *

* @param longitudeIn the decimal longitude */ public final void setLongitude(Double longitudeIn) { this.longitude = longitudeIn; } /** * * @return the decimal longitude of the coordinate. */ public Double getLongitude() { return longitude; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((latitude == null) ? 0 : latitude.hashCode()); result = prime * result + ((longitude == null) ? 0 : longitude.hashCode()); return result; } @Override public boolean equals(final Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final Coordinate other = (Coordinate) obj; if (latitude == null) { if (other.latitude != null) { return false; } } else if (!latitude.equals(other.latitude)) { return false; } if (longitude == null) { if (other.longitude != null) { return false; } } else if (!longitude.equals(other.longitude)) { return false; } return true; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy