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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanDetermine whether two Vertex objects describe the same point.doublegetLat()Gets the lat attribute of the Vertex objectdoublegetLon()Gets the longitude of the VertexinthashCode()Return a unique hash code based on the latitude and longitude valuesvoidsetLat(double Lat) Sets the latitude of the VertexvoidsetLon(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.
-