|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object Graph.Edge
public class Graph.Edge
Implements an edge in a graph.
Constructor Summary | |
---|---|
Graph.Edge(E data,
Graph.Node head,
Graph.Node tail)
Constructor creates a new edge |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object o)
Two edges are equal if they connect the same endpoints regardless of the data they carry. |
E |
getData()
Accessor for data |
Graph.Node |
getHead()
Accessor for endpoint #1 |
Graph.Node |
getTail()
Accessor for endpoint #2 |
int |
hashCode()
Redefined hashcode to match redefined equals |
Graph.Node |
oppositeTo(Graph.Node node)
Accessor for opposite node |
void |
setData(E data)
Manipulator for data |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Graph.Edge(E data, Graph.Node head, Graph.Node tail)
Method Detail |
---|
public E getData()
public Graph.Node getHead()
public Graph.Node getTail()
public Graph.Node oppositeTo(Graph.Node node)
public void setData(E data)
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |