Class Edge
java.lang.Object
|
+----Edge
- public class Edge
- extends Object
A class representing an edge.
-
Edge(Vertex, Vertex)
- Construct an edge using two vertices.
-
getVertices()
- Returns the pair of end-point vertices of an edge.
-
sameEdge(Edge, Edge)
- Check whether two edges are the same.
-
toString()
- Produce a string describing an edge.
Edge
public Edge(Vertex v1,
Vertex v2)
- Construct an edge using two vertices.
- Parameters:
- v1, - v2 the end-points of the edge
sameEdge
public static boolean sameEdge(Edge e1,
Edge e2)
- Check whether two edges are the same.
- Parameters:
- e1, - e2 the edges to compare
- Returns:
- True/false if the edges are the same/different.
- See Also:
- sameVertex
getVertices
public Vertex[] getVertices()
- Returns the pair of end-point vertices of an edge.
- Returns:
- An array of two vertices in the order they were stored.
toString
public String toString()
- Produce a string describing an edge.
- Overrides:
- toString in class Object