ptolemy.vergil.kernel
Class Link

java.lang.Object
  extended byptolemy.vergil.kernel.Link

public class Link
extends java.lang.Object

Instances of this class represent a link between a port and a relation, OR a binary connection between two ports. In the first case, the relation is represented by an explicit node in the graph. In the second case, there is no explicit node representing the relation and the edge runs directly from one port to the other. Connections are made and broken by the graph model depending on which of the above contexts the link is being used in.

Since:
Ptolemy II 2.0
Version:
$Id: Link.java,v 1.11 2004/04/13 03:51:40 cxh Exp $
Author:
Steve Neuendorffer
Accepted Rating:
Red (johnr)
Proposed Rating:
Red (eal)

Constructor Summary
Link()
           
 
Method Summary
 java.lang.Object getHead()
          Return the head of this link.
 ComponentRelation getRelation()
          Return the relation that this link represents.
 java.lang.Object getTail()
          Return the tail of this link.
 void setHead(java.lang.Object head)
          Set the head of this link.
 void setRelation(ComponentRelation relation)
          Set the relation for this link.
 void setTail(java.lang.Object tail)
          Set the tail of this link.
 java.lang.String toString()
          Return a string representation of this link.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Link

public Link()
Method Detail

getHead

public java.lang.Object getHead()
Return the head of this link. This may be a port, or a vertex in a relation.


getRelation

public ComponentRelation getRelation()
Return the relation that this link represents. If the link goes from a port to a port, then this is the only way to get at the relation. If the link goes from a vertex to a port, then the relation will be the container of the vertex.


getTail

public java.lang.Object getTail()
Return the tail of this link. This may be a port, or a vertex in a relation.


setHead

public void setHead(java.lang.Object head)
Set the head of this link. This may be a port, or a vertex in a relation.


setRelation

public void setRelation(ComponentRelation relation)
Set the relation for this link.


setTail

public void setTail(java.lang.Object tail)
Set the tail of this link. This may be a port, or a vertex in a relation.


toString

public java.lang.String toString()
Return a string representation of this link.