public final class RectLocation
extends java.lang.Object
LineLocation values indicating the
location of each point dimension relative to the corresponding rectangle edge.
For this purpose, the rectangle edges are interpreted as directed line segments
starting at the minimum coordinate and ending at the maximum coordinate.| Modifier and Type | Field and Description |
|---|---|
LineLocation |
edgeX
The relative location of the point along the x-coordinate.
|
LineLocation |
edgeY
The relative location of the point along the y-coordinate.
|
| Constructor and Description |
|---|
RectLocation(LineLocation edgeX,
LineLocation edgeY)
Creates a
RectLocation with the specified dimensional locations. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj)
Compares the specified
Object to this RectLocation instance. |
int |
hashCode()
Returns a hash code for the
RectLocation. |
java.lang.String |
toString()
Returns a
String representation of the RectLocation. |
public final LineLocation edgeX
LineLocation of the point relative to the rectangle’s top
(or bottom) edge, shifted to the point’s y-coordinate. Never null,
LineLocation.LEFT, or LineLocation.RIGHT.public final LineLocation edgeY
LineLocation of the point relative to the rectangle’s left
(or right) edge, shifted to the point’s x-coordinate. Never null,
LineLocation.LEFT, or LineLocation.RIGHT.public RectLocation(LineLocation edgeX, LineLocation edgeY)
RectLocation with the specified dimensional locations.edgeX - the relative location of the point along the x-coordinateedgeY - the relative location of the point along the y-coordinatejava.lang.NullPointerException - if edgeX or edgeY is nulljava.lang.IllegalArgumentException - if edgeX or edgeY is
LineLocation.LEFT or LineLocation.RIGHTpublic boolean equals(java.lang.Object obj)
Object to this RectLocation instance.equals in class java.lang.Objectobj - the Object to compare to this instancetrue if obj is not null and a RectLocation
instance whose edgeX and edgeY values equal those
of this instance, else falsepublic int hashCode()
RectLocation.hashCode in class java.lang.ObjectInteger hash code for the RectLocationpublic java.lang.String toString()
String representation of the RectLocation.