@Immutable
@Embeddable
public class Location
extends java.lang.Object
implements java.io.Serializable
| Constructor and Description |
|---|
Location(double lat,
double lon)
Member Functions
|
| Modifier and Type | Method and Description |
|---|---|
double |
distance(Location l2)
Returns distance in meters between this location and the
location l2 passed in.
|
double |
distance(Vector v)
Returns distance in meters between location and the
closest match to the specified Vector.
|
boolean |
equals(java.lang.Object obj)
If don't have hashCode() and equals() then the objects that include this
object will generate a warning when these methods are implemented.
|
double |
getLat() |
double |
getLon() |
int |
hashCode()
If don't have hashCode() and equals() then the objects that include this
object will generate a warning when these methods are implemented.
|
double |
matchDistanceAlongVector(Vector v)
Returns length along vector where this location is closest
to the vector.
|
java.lang.String |
toString()
Outputs only "[lat, lon]".
|
public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic double getLat()
public double getLon()
public double distance(Location l2)
l2 - public double distance(Vector v)
v - public double matchDistanceAlongVector(Vector v)
v - public java.lang.String toString()
toString in class java.lang.Object