computational.geometry
Class Polygon.Edge
java.lang.Object
computational.geometry.Segment
computational.geometry.Polygon.Edge
- All Implemented Interfaces:
- Shape, java.io.Serializable, java.lang.Cloneable
- Enclosing class:
- Polygon
public class Polygon.Edge
- extends Segment
- See Also:
- Serialized Form
Method Summary |
boolean |
equals(java.lang.Object obj)
Determines whether or not two segments are equal. |
java.util.List |
getIndices()
|
java.util.List |
getVertices()
|
java.lang.String |
toString()
Returns a string representation of this segment. |
Methods inherited from class computational.geometry.Segment |
boundingBox, clone, contains, draw, drawArrows, drawLabels, drawPoints, getLabel, getPoints, intersect, length, movePoint, setLabel, translate |
Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Polygon.Edge
public Polygon.Edge(Polygon.Vertex v0,
Polygon.Vertex v1)
equals
public boolean equals(java.lang.Object obj)
- Description copied from class:
Segment
- Determines whether or not two segments are equal.
Two instances of
Segment
are equal if their extreme
points are equal.
- Overrides:
equals
in class Segment
- Parameters:
obj
- an object to be compared with this Segment
- Returns:
true
if the object to be compared is
an instance of Segment
and has
the same extreme points; false
otherwise.
getIndices
public java.util.List getIndices()
getVertices
public java.util.List getVertices()
toString
public java.lang.String toString()
- Description copied from class:
Segment
- Returns a string representation of this segment.
The string is composed of the segment's label (if any),
and the segment's extreme points.
- Overrides:
toString
in class Segment
- Returns:
- a string representation of this segment.