| Modifier and Type | Field and Description |
|---|---|
| private final Point2D | centerPoint
The edge's center point. |
| private final double | length
The edge's length. |
| private final Orientation | orientation
The edge's orientation. |
| Access | Constructor and Description |
|---|---|
| public | Edge2D(Point2D
the edge's center point centerPoint, Orientation the edge's orientation orientation, double the edge's length; must be non-negative. length)Creates a new edge which is specified by its center point, orientation and length. |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | equals(Object obj)
Overrides java. Indicates whether some other object is "equal to" this one. |
| public Point2D | |
| public double | |
| public Point2D | |
| public Orientation | |
| public double | Returns: the distancethe point to where the distance is computed otherPoint)Returns the distance of the specified point to the edge in terms of the dimension orthogonal to the edge's orientation. |
| public Point2D | |
| public int | |
| public boolean | |
| public boolean | |
| public String |
| centerPoint | back to summary |
|---|---|
| private final Point2D centerPoint The edge's center point. | |
| length | back to summary |
|---|---|
| private final double length The edge's length. | |
| orientation | back to summary |
|---|---|
| private final Orientation orientation The edge's orientation. | |
| Edge2D | back to summary |
|---|---|
| public Edge2D(Point2D centerPoint, Orientation orientation, double length) Creates a new edge which is specified by its center point, orientation and length.
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object obj) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.
| |
| getCenterPoint | back to summary |
|---|---|
public Point2D getCenterPoint()
| |
| getLength | back to summary |
|---|---|
public double getLength()
| |
| getLowerRight | back to summary |
|---|---|
| public Point2D getLowerRight() Returns the edge's lower right end point. It has (
| |
| getOrientation | back to summary |
|---|---|
| public Orientation getOrientation() Returns this edge's orientation. Note that the orientation can also be checked with
| |
| getOrthogonalDifference | back to summary |
|---|---|
| public double getOrthogonalDifference(Point2D otherPoint) Returns the distance of the specified point to the edge in terms of the dimension orthogonal to the edge's
orientation. The sign denotes whether on which side of the edge, the point lies.
| |
| getUpperLeft | back to summary |
|---|---|
| public Point2D getUpperLeft() Returns the edge's upper left end point. It has (
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| isHorizontal | back to summary |
|---|---|
| public boolean isHorizontal() Indicates whether this is a
| |
| isVertical | back to summary |
|---|---|
| public boolean isVertical() Indicates whether this is a
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non-
| |