net.ggtools.grand.graph
Class LinkImpl
java.lang.Object
net.ggtools.grand.graph.AttributeManager
net.ggtools.grand.graph.LinkImpl
- All Implemented Interfaces:
- GraphObject, Link
- Direct Known Subclasses:
- AntLink
public class LinkImpl
- extends AttributeManager
- implements Link
- Author:
- Christophe Labouisse
|
Constructor Summary |
LinkImpl(java.lang.String name,
Graph graph,
Node startNode,
Node endNode)
Creates a new Link. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
LinkImpl
public LinkImpl(java.lang.String name,
Graph graph,
Node startNode,
Node endNode)
- Creates a new Link.
- Parameters:
name - link's name, may be null.graph - owning graph.startNode - start node of the linkendNode - link's end node.
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
getStartNode
public Node getStartNode()
- Description copied from interface:
Link
- Return the node located at the start of the link.
- Specified by:
getStartNode in interface Link
- Returns:
- start node
getEndNode
public Node getEndNode()
- Description copied from interface:
Link
- Return the node located at the end of the link.
- Specified by:
getEndNode in interface Link
- Returns:
- end node
getGraph
public Graph getGraph()
- Description copied from interface:
GraphObject
- Gets the owner graph of the object.
- Specified by:
getGraph in interface GraphObject
- Returns:
- the owning graph.
getName
public java.lang.String getName()
- Description copied from interface:
GraphObject
- Gets the object's name.
- Specified by:
getName in interface GraphObject
- Returns:
- object's name.
accept
public void accept(LinkVisitor visitor)
- Description copied from interface:
Link
- Accepts a visitor. The implementation must call the appropriate
visitLink method.
- Specified by:
accept in interface Link
Copyright © 2004-2005 ggTools. All Rights Reserved.