|
Algorithm Development Kit 1.0 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface IRectangle
Represents a rectangle in the Cartesian plane.
Classes that implement this interface must provide accurate Object.equals(Object)
and Object.hashCode() methods. To be useful during debugging, one should
also have a meaningful Object.toString() method.
Note that it is an invariant that getLeft() <= getRight() while getBottom() <= getTop()
| Method Summary | |
|---|---|
boolean |
contains(IRectangle r)
Determine if rectangle contains the given rectangle r. |
boolean |
equals(java.lang.Object o)
Must properly compute equals(Object) to compare based on getXXX() values. |
double |
getBottom()
return the y-coordinate value for the bottom. |
double |
getLeft()
return the x-coordinate value for the left-side. |
double |
getRight()
return the x-coordinate value for the right-side. |
double |
getTop()
return the y-coordinate value for the top. |
boolean |
intersects(IPoint p)
Determine if the given point intersects the rectangle. |
| Method Detail |
|---|
double getLeft()
double getBottom()
double getRight()
double getTop()
boolean intersects(IPoint p)
boolean contains(IRectangle r)
boolean equals(java.lang.Object o)
equals in class java.lang.ObjectObject.equals(Object)
|
Algorithm Development Kit 1.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||