info.aduna.clustermap.graph
Class Edge

java.lang.Object
  extended by info.aduna.clustermap.graph.Edge
Direct Known Subclasses:
ClassificationEdge, ClusterEdge

public class Edge
extends Object

An Edge connects two Vertices in a Graph.

See Also:
Vertex, Graph

Constructor Summary
Edge()
          Create a new Edge with initially no connected Vertices.
Edge(Vertex source, Vertex destination)
          Create a new Edge connecting the specified Vertices.
 
Method Summary
 boolean connects(Vertex vertex1, Vertex vertex2)
          Determines whether this Edge connects the two specified Vertices.
 Vertex getDestination()
           
 Object getLayoutAttribute()
           
 Vertex getOtherVertex(Vertex vertex)
          Given one of the Vertices connected by this Edge, this method returns the other one.
 Vertex getSource()
           
 boolean isConnectedTo(Vertex vertex)
          Determines whether the specified Vertex is connected to this Edge.
 void setDestination(Vertex destination)
           
 void setLayoutAttribute(Object layoutAttribute)
           
 void setSource(Vertex source)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Edge

public Edge()
Create a new Edge with initially no connected Vertices.


Edge

public Edge(Vertex source,
            Vertex destination)
Create a new Edge connecting the specified Vertices.

Method Detail

getSource

public Vertex getSource()

setSource

public void setSource(Vertex source)

getDestination

public Vertex getDestination()

setDestination

public void setDestination(Vertex destination)

getLayoutAttribute

public Object getLayoutAttribute()

setLayoutAttribute

public void setLayoutAttribute(Object layoutAttribute)

isConnectedTo

public boolean isConnectedTo(Vertex vertex)
Determines whether the specified Vertex is connected to this Edge.


connects

public boolean connects(Vertex vertex1,
                        Vertex vertex2)
Determines whether this Edge connects the two specified Vertices.


getOtherVertex

public Vertex getOtherVertex(Vertex vertex)
Given one of the Vertices connected by this Edge, this method returns the other one. When the specified Vertex is not connected to this Edge (according to the registration of the Edge itself), 'null' is returned.



Copyright © 1997-2008 Aduna. All Rights Reserved.