deCarta Android API Documentation - Copyright

com.decarta.android.location
Class BoundingBox

java.lang.Object
  extended by com.decarta.android.location.BoundingBox
All Implemented Interfaces:
java.io.Serializable

public class BoundingBox
extends java.lang.Object
implements java.io.Serializable

The BoundingBox class marks a rectangular geography. The extents are marked by two Positions located at the upper-right (maximum) and lower-left (minimum) locations.

See Also:
Serialized Form

Constructor Summary
BoundingBox()
           
BoundingBox(Position min, Position max)
           
 
Method Summary
 boolean contains(Position pos)
          Check if a given Position is within the BoundingBox
 Position getCenterPosition()
          Retrieve the center position of the bounding box.
 Position getMaxPosition()
          The upper-right corner of the bounding box
 Position getMinPosition()
          The lower-left corner of the bounding box
 void setMaxPosition(Position maxPosition)
          The upper-right corner of the bounding box
 void setMinPosition(Position minPosition)
          The lower-left corner of the bounding box
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BoundingBox

public BoundingBox()

BoundingBox

public BoundingBox(Position min,
                   Position max)
Method Detail

getMaxPosition

public Position getMaxPosition()
The upper-right corner of the bounding box


setMaxPosition

public void setMaxPosition(Position maxPosition)
The upper-right corner of the bounding box


getMinPosition

public Position getMinPosition()
The lower-left corner of the bounding box


setMinPosition

public void setMinPosition(Position minPosition)
The lower-left corner of the bounding box


getCenterPosition

public Position getCenterPosition()
Retrieve the center position of the bounding box.

Returns:
Position calculated center point of the BoundingBox

contains

public boolean contains(Position pos)
Check if a given Position is within the BoundingBox

Parameters:
pos - required coordinate to test
Returns:
boolean true if located within the BoundingBox, false if located outside of the BoundingBox

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

deCarta Android API Documentation - Copyright

deCarta Android API Documentation - Copyright