Package org.jgrapht.graph
Class DefaultWeightedEdge
- java.lang.Object
- 
- org.jgrapht.graph.DefaultWeightedEdge
 
- 
- All Implemented Interfaces:
- java.io.Serializable,- java.lang.Cloneable
 
 public class DefaultWeightedEdge extends java.lang.ObjectA default implementation for edges in a weighted graph. All access to the weight of an edge must go through the graph interface, which is why this class doesn't expose any public methods.- Author:
- John V. Sichi
- See Also:
- Serialized Form
 
- 
- 
Constructor SummaryConstructors Constructor Description DefaultWeightedEdge()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectclone()protected java.lang.ObjectgetSource()Retrieves the source of this edge.protected java.lang.ObjectgetTarget()Retrieves the target of this edge.protected doublegetWeight()Retrieves the weight of this edge.java.lang.StringtoString()
 
- 
- 
- 
Method Detail- 
getSourceprotected java.lang.Object getSource() Retrieves the source of this edge. This is protected, for use by subclasses only (e.g. for implementing toString).- Returns:
- source of this edge
 
 - 
getTargetprotected java.lang.Object getTarget() Retrieves the target of this edge. This is protected, for use by subclasses only (e.g. for implementing toString).- Returns:
- target of this edge
 
 - 
getWeightprotected double getWeight() Retrieves the weight of this edge. This is protected, for use by subclasses only (e.g. for implementing toString).- Returns:
- weight of this edge
 
 - 
toStringpublic java.lang.String toString() - Overrides:
- toStringin class- java.lang.Object
 
 - 
clonepublic java.lang.Object clone() - Overrides:
- clonein class- java.lang.Object
- See Also:
- Object.clone()
 
 
- 
 
-