|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg._3pq.jgrapht.edge.DefaultEdge
public class DefaultEdge
A skeletal implementation of the Edge interface, to minimize the effort required to implement the interface.
| Field Summary |
|---|
| Fields inherited from interface org._3pq.jgrapht.Edge |
|---|
DEFAULT_EDGE_WEIGHT |
| Constructor Summary | |
|---|---|
DefaultEdge(java.lang.Object sourceVertex,
java.lang.Object targetVertex)
Constructor for DefaultEdge. |
|
| Method Summary | |
|---|---|
java.lang.Object |
clone()
Creates and returns a shallow copy of this edge. |
boolean |
containsVertex(java.lang.Object v)
Returns true if this edge contains the specified vertex. |
java.lang.Object |
getSource()
Returns the source vertex of this edge. |
java.lang.Object |
getTarget()
Returns the target vertex of this edge. |
double |
getWeight()
Returns the weight of this edge. |
java.lang.Object |
oppositeVertex(java.lang.Object v)
Returns the vertex opposite to the specified vertex. |
void |
setWeight(double weight)
Sets the weight of this edge. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultEdge(java.lang.Object sourceVertex,
java.lang.Object targetVertex)
sourceVertex - source vertex of the edge.targetVertex - target vertex of the edge.| Method Detail |
|---|
public java.lang.Object getSource()
Edge
getSource in interface EdgeEdge.getSource()public java.lang.Object getTarget()
Edge
getTarget in interface EdgeEdge.getTarget()public void setWeight(double weight)
EdgeUnsupportedOperationException is thrown.
setWeight in interface Edgeweight - new weight.Edge.setWeight(double)public double getWeight()
Edge1.0 is returned.
getWeight in interface EdgeEdge.getWeight()public java.lang.Object clone()
Edge
clone in interface Edgeclone in class java.lang.ObjectEdge.clone()public boolean containsVertex(java.lang.Object v)
Edge
this.getSource().equals(v) || this.getTarget().equals(v)
containsVertex in interface Edgev - vertex whose presence in this edge is to be tested.
Edge.containsVertex(java.lang.Object)public java.lang.Object oppositeVertex(java.lang.Object v)
Edge
oppositeVertex in interface Edgev - the vertex whose opposite is required.
Edge.oppositeVertex(java.lang.Object)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||