de.korelstar.math.graph
Class Edge
java.lang.Object
de.korelstar.math.graph.Edge
- All Implemented Interfaces:
- java.io.Serializable
- Direct Known Subclasses:
- LSA, Precedence
public class Edge
- extends java.lang.Object
- implements java.io.Serializable
Directed edge of a graph, which connects two nodes
- See Also:
- Serialized Form
Constructor Summary |
Edge(Node source,
Node target)
Creates a directed edge, which connects two nodes |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
Edge
public Edge(Node source,
Node target)
- Creates a directed edge, which connects two nodes
- Parameters:
source
- First Nodetarget
- Second Node
getSource
public Node getSource()
- Returns:
- source of the edge
getTarget
public Node getTarget()
- Returns:
- target of the edge
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object