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