Package llnl.gnem.core.polygon
Class Vertex
java.lang.Object
llnl.gnem.core.polygon.Vertex
- All Implemented Interfaces:
Serializable
A class that encapsulates a 2-D point on the surface of the Earth described
by a latitude and a longitude
- Author:
- Doug Dodge
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Determine whether two Vertex objects describe the same point.double
getLat()
Gets the lat attribute of the Vertex objectdouble
getLon()
Gets the longitude of the Vertexint
hashCode()
Return a unique hash code based on the latitude and longitude valuesvoid
setLat
(double Lat) Sets the latitude of the Vertexvoid
setLon
(double Lon) Sets the longitude of the VertextoString()
Returns a String description of the Vertex.
-
Constructor Details
-
Vertex
public Vertex(double Lat, double Lon) Creates a new Vertex from a latitude and a longitude value- Parameters:
Lat
- The latitude of the pointLon
- The longitude of the point
-
Vertex
Copy Constructor for the Vertex object- Parameters:
v
- The Vertex to be copied
-
-
Method Details
-
getLat
public double getLat()Gets the lat attribute of the Vertex object- Returns:
- The lat value
-
getLon
public double getLon()Gets the longitude of the Vertex- Returns:
- The lon value
-
setLat
public void setLat(double Lat) Sets the latitude of the Vertex- Parameters:
Lat
- The new lat value
-
setLon
public void setLon(double Lon) Sets the longitude of the Vertex- Parameters:
Lon
- The new lon value
-
equals
Determine whether two Vertex objects describe the same point. -
hashCode
public int hashCode()Return a unique hash code based on the latitude and longitude values -
toString
Returns a String description of the Vertex.
-