com.alexmerz.graphviz.objects
Class PortNode

java.lang.Object
  extended by com.alexmerz.graphviz.objects.PortNode

public class PortNode
extends java.lang.Object

This class is an extended Node object containing Port information of a node in an edge. A PortNode does not hold an Id object, because it is only a wrapper for a node as a part of an edge.

Version:
$Id: PortNode.java,v 1.3 2006/03/20 16:45:41 Alexander Exp $
Author:
Alexander Merz

Constructor Summary
PortNode()
          Creates an empty PortNode object
PortNode(Node n)
          Creates a PortNode with a given Node and empty port
PortNode(Node n, java.lang.String port)
          Creates a PortNode with the given Node and Port
 
Method Summary
 Node getNode()
          Returns the node
 java.lang.String getPort()
          Returns the port of the node
 void setNode(Node node)
          Sets the node
 void setPort(java.lang.String port)
          Sets the port of the node
 java.lang.String toString()
          Returns the String representation
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PortNode

public PortNode()
Creates an empty PortNode object


PortNode

public PortNode(Node n)
Creates a PortNode with a given Node and empty port

Parameters:
n - the node object

PortNode

public PortNode(Node n,
                java.lang.String port)
Creates a PortNode with the given Node and Port

Parameters:
n - the node object
port - the port
Method Detail

getPort

public java.lang.String getPort()
Returns the port of the node

Returns:
the port

setPort

public void setPort(java.lang.String port)
Sets the port of the node

Parameters:
port -

getNode

public Node getNode()
Returns the node

Returns:
the node object

setNode

public void setNode(Node node)
Sets the node

Parameters:
node -

toString

public java.lang.String toString()
Returns the String representation

Overrides:
toString in class java.lang.Object
Returns:
the string representation