Package dsa.lab10.base
Class Edge<Vertex,Weight> 
java.lang.Object
dsa.lab10.base.Edge<Vertex,Weight> 
- Type Parameters:
- Vertex- the vertex type
- Weight- the weight type
An edge in a directed graph.
- 
Constructor SummaryConstructors
- 
Method Summary
- 
Constructor Details- 
EdgeConstruct an edge between the given vertices with no weight data.- Parameters:
- source- the source vertex
- target- the target vertex
 
- 
EdgeConstruct an edge between the given vertices with the given weight.- Parameters:
- source- the source vertex
- target- the target vertex
- weight- the weight data
 
 
- 
- 
Method Details- 
sourceGet the source vertex.- Returns:
- the source vertex
 
- 
targetGet the target vertex.- Returns:
- the target vertex
 
- 
weightGet the weight data (nullif there is none).- Returns:
- the weight data
 
- 
equals
- 
hashCodepublic int hashCode()
- 
toString
 
-