org.quilt.graph
Class Edge

java.lang.Object
  |
  +--org.quilt.graph.Edge

public class Edge
extends java.lang.Object

An edge in a Quilt graph. This is seen as a source/target pair, XXX but in fact the source field may be unnecessary.

Author:
< a href="jddixon@users.sourceforge.net">Jim Dixon

Field Summary
protected  Vertex source_
           
protected  Vertex target_
           
 
Constructor Summary
Edge(Edge e)
          Copy constructor.
Edge(Vertex s, Vertex t)
          An edge in a directed graph.
 
Method Summary
static void checkForNull(java.lang.Object o, java.lang.String what)
           
 Directed getGraph()
           
 Vertex getSource()
           
 Vertex getTarget()
           
 void insert(Vertex v)
          Insert a vertex with a UnaryConnector into an edge.
 void setSource(Vertex v)
           
 void setTarget(Vertex v)
          Change the target of this edge.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

source_

protected Vertex source_

target_

protected Vertex target_
Constructor Detail

Edge

public Edge(Vertex s,
            Vertex t)
An edge in a directed graph.


Edge

public Edge(Edge e)
Copy constructor.

Method Detail

getSource

public Vertex getSource()

setSource

public void setSource(Vertex v)

getTarget

public Vertex getTarget()

setTarget

public void setTarget(Vertex v)
Change the target of this edge. XXX Wasn't public before; made it so to allow cl.SortedBlocks to retarget to existing vertex.


checkForNull

public static void checkForNull(java.lang.Object o,
                                java.lang.String what)

getGraph

public Directed getGraph()
Returns:
the graph that this edge is in.

insert

public void insert(Vertex v)
Insert a vertex with a UnaryConnector into an edge.

Parameters:
v - The Vertex being inserted.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
Returns:
A String description of the edge, NOT newline-terminated.


Copyright © 2001-2003 Apache Software Foundation. All Rights Reserved.