public class Rectangle extends Object
| Constructor and Description |
|---|
Rectangle(com.vividsolutions.jts.geom.Envelope e)
A constructor creating a rectangle from a jts Envelope
|
Rectangle(long x1,
long x2,
long y1,
long y2)
A constructor creating a rectangle from two X and two Y coordinates
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(Rectangle r)
A method which decides if this rectangle contains the specified
rectangle.
|
boolean |
containsPoint(long x,
long y)
A method which decides if this rectangle contains the specified point.
|
long |
getMaxX()
Getter method for the biggest X coordinate
|
long |
getMaxY()
Getter method for the biggest Y coordinate
|
long |
getMinX()
Getter method for the smallest X coordinate
|
long |
getMinY()
Getter method for the smallest Y coordinate
|
boolean |
overlaps(Rectangle r)
A method which decides if this rectangle overlaps with the specified
rectangle.
|
String |
toString() |
public Rectangle(long x1,
long x2,
long y1,
long y2)
x1 - -
one of two X coodinatesx2 - -
one of two X coodinatesy1 - -
one of two Y coodinatesy2 - -
one of two Y coodinatespublic Rectangle(com.vividsolutions.jts.geom.Envelope e)
e - -
The jts Envelope to represent as a rectanglepublic long getMinX()
public long getMaxX()
public long getMinY()
public long getMaxY()
public boolean contains(Rectangle r)
r - -
The rectangle to test whether is contained by this rectangle.public boolean containsPoint(long x,
long y)
x - -
The X coordinate of the point to test whether is contained by
this rectangle.y - -
The Y coordinate of the point to test whether is contained by
this rectangle.public boolean overlaps(Rectangle r)
r - -
The rectangle to test whether overlaps with this rectangle.Copyright © 2014. All Rights Reserved.