@Immutable
@Embeddable
public class Extent
extends java.lang.Object
implements java.io.Serializable
Constructor and Description |
---|
Extent()
Hibernate requires a no-arg constructor so might as well be
explicit about it.
|
Modifier and Type | Method and Description |
---|---|
void |
add(Extent e)
Once an Extent has been constructed need to simply add
associated Extents (or Locations).
|
void |
add(Location l)
Once an Extent has been constructed need to simply add
associated Locations (or Extents).
|
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 |
getMaxLat() |
double |
getMaxLon() |
double |
getMinLat() |
double |
getMinLon() |
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.
|
boolean |
isWithinDistance(Location loc,
double distance)
Returns true if the location is with the specified distance of this
extent.
|
java.lang.String |
toString() |
public Extent()
public void add(Location l)
l
- public void add(Extent e)
l
- public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public boolean isWithinDistance(Location loc, double distance)
loc
- distance
- public double getMinLat()
public double getMaxLat()
public double getMinLon()
public double getMaxLon()