| Modifier and Type | Method and Description |
|---|---|
| public int | compareTo(final RectangleImmutable
the object to be compared. d)Redeclares java. Compares square of size 1st, if equal the square of position. |
| public float | coverage(RectangleImmutable r)
Returns the coverage of given rectangle w/ this this one, i.e. between |
| public boolean | |
| public int | |
| public int | |
| public int | |
| public int | |
| public int | |
| public RectangleImmutable | intersection(RectangleImmutable r)
Returns the intersection of this rectangleand the given rectangle. |
| public RectangleImmutable | intersection(final int rx1, final int ry1, final int rx2, final int ry2)
Returns the intersection of this rectangleand the given coordinates. |
| public RectangleImmutable | |
| public RectangleImmutable | union(final int rx1, final int ry1, final int rx2, final int ry2)
Returns the union of this rectangleand the given coordinates. |
| compareTo | back to summary |
|---|---|
| public int compareTo(final RectangleImmutable d) Redeclares java. Doc from java. Compares square of size 1st, if equal the square of position. Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.The implementor must ensure The implementor must also ensure that the relation is transitive:
Finally, the implementor must ensure that
| |
| coverage | back to summary |
|---|---|
| public float coverage(RectangleImmutable r) Returns the coverage of given rectangle w/ this this one, i.e. between Coverage is computed by: isect = this.intersection(r); coverage = area( isect ) / area( this ) ; | |
| equals | back to summary |
|---|---|
| public boolean equals(Object obj) Checks whether two rect objects are equal. Two instances
of
| |
| getHeight | back to summary |
|---|---|
| public int getHeight() | |
| getWidth | back to summary |
|---|---|
| public int getWidth() | |
| getX | back to summary |
|---|---|
| public int getX() | |
| getY | back to summary |
|---|---|
| public int getY() | |
| hashCode | back to summary |
|---|---|
public int hashCode()
| |
| intersection | back to summary |
|---|---|
| public RectangleImmutable intersection(RectangleImmutable r) Returns the intersection of this rectangleand the given rectangle. | |
| intersection | back to summary |
|---|---|
| public RectangleImmutable intersection(final int rx1, final int ry1, final int rx2, final int ry2) Returns the intersection of this rectangleand the given coordinates. | |
| union | back to summary |
|---|---|
| public RectangleImmutable union(final RectangleImmutable r) Returns the union of this rectangle and the given rectangle. | |
| union | back to summary |
|---|---|
| public RectangleImmutable union(final int rx1, final int ry1, final int rx2, final int ry2) Returns the union of this rectangleand the given coordinates. | |