public class MapBounds
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected boolean |
swigCMemOwn |
Constructor and Description |
---|
MapBounds()
Constructs an empty MapBounds object.
|
MapBounds(long cPtr,
boolean cMemoryOwn) |
MapBounds(MapPos min,
MapPos max)
Constructs a MapBounds object from a minimum and maximum map position.
|
Modifier and Type | Method and Description |
---|---|
boolean |
contains(MapBounds bounds)
Tests whether this map bounds object contains a another map bounds object.
|
boolean |
contains(MapPos pos)
Tests whether this map bounds object contains a map position.
|
void |
delete() |
boolean |
equals(java.lang.Object obj)
Checks if this object is equal to the specified object.
|
protected void |
finalize() |
MapPos |
getCenter()
Calculates the center map position of this map envelope object.
|
static long |
getCPtr(MapBounds obj) |
MapVec |
getDelta()
Calculates the difference vector between the maximum and minimum map positions of this map bounds object.
|
MapPos |
getMax()
Returns the maximum (north east) map position of this map envelope object.
|
MapPos |
getMin()
Returns the minimum (south west) map position of this map envelope object.
|
int |
hashCode()
Returns the hash value of this object.
|
boolean |
intersects(MapBounds bounds)
Tests whether this map bounds object intersects with a another map bounds object.
|
java.lang.String |
toString()
Creates a string representation of this map bounds object, useful for logging.
|
public MapBounds(long cPtr, boolean cMemoryOwn)
public MapBounds()
public MapBounds(MapPos min, MapPos max)
min
- The minimum map position (south-west).max
- The maximum map position (north-east).public static long getCPtr(MapBounds obj)
protected void finalize()
finalize
in class java.lang.Object
public void delete()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public MapPos getCenter()
public MapVec getDelta()
public MapPos getMin()
public MapPos getMax()
public boolean contains(MapPos pos)
pos
- The map position.public boolean contains(MapBounds bounds)
bounds
- The other map bounds object.public boolean intersects(MapBounds bounds)
bounds
- The other map bounds object.public java.lang.String toString()
toString
in class java.lang.Object