|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.garret.perst.RectangleR2
R2 rectangle class. This class is used in spatial index.
| Constructor Summary | |
RectangleR2()
Default constructor for PERST |
|
RectangleR2(double top,
double left,
double bottom,
double right)
Construct rectangle with specified coordinates |
|
RectangleR2(RectangleR2 r)
Create copy of the rectangle |
|
| Method Summary | |
double |
area()
Rectangle area |
java.lang.Object |
clone()
Clone rectangle |
boolean |
contains(RectangleR2 r)
Checks if this rectangle contains the specified rectangle |
boolean |
equals(java.lang.Object o)
Check if two rectangles are equal |
double |
getBottom()
Greatest Y coordinate of the rectangle |
double |
getLeft()
Smallest X coordinate of the rectangle |
double |
getRight()
Greatest X coordinate of the rectangle |
double |
getTop()
Smallest Y coordinate of the rectangle |
int |
hashCode()
Hash code consists of all rectangle coordinates |
boolean |
intersects(RectangleR2 r)
Checks if this rectangle intersects with specified rectangle |
void |
join(RectangleR2 r)
Join two rectangles. |
static RectangleR2 |
join(RectangleR2 a,
RectangleR2 b)
Non destructive join of two rectangles. |
static double |
joinArea(RectangleR2 a,
RectangleR2 b)
Area of covered rectangle for two sepcified rectangles |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public RectangleR2()
public RectangleR2(double top,
double left,
double bottom,
double right)
public RectangleR2(RectangleR2 r)
| Method Detail |
public final double area()
public java.lang.Object clone()
public final boolean contains(RectangleR2 r)
public boolean equals(java.lang.Object o)
public final double getBottom()
public final double getLeft()
public final double getRight()
public final double getTop()
public int hashCode()
public final boolean intersects(RectangleR2 r)
public final void join(RectangleR2 r)
r - rectangle to be joined with this rectangle
public static RectangleR2 join(RectangleR2 a,
RectangleR2 b)
a - first joined rectangleb - second joined rectangle
public static double joinArea(RectangleR2 a,
RectangleR2 b)
public java.lang.String toString()
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||