com.mindfusion.diagramming.jlayout
Class Path

java.lang.Object
  extended by com.mindfusion.diagramming.jlayout.Path

public class Path
extends java.lang.Object


Constructor Summary
Path()
           
Path(Path p)
           
 
Method Summary
 void add(Link link, Node node)
          Append the node and the link to the path.
 void add(Node node)
          Append the node to the path.
 boolean contains(Link link)
          Checks whether the specified link is a participant in the path.
 boolean contains(Node node)
          Checks whether the specified node is a participant in the path.
 java.util.ArrayList<java.lang.Object> getItems()
          Gets a list with all items (nodes and links) composing the path.
 int getLength()
          Gets the length of the path.
 LinkList getLinks()
          Gets a list of all links composing the path.
 NodeList getNodes()
          Gets the list of all nodes connected by the path.
 float getWeight(boolean incNodes, boolean incLinks)
          Gets the length of the path expressed as a sum of the weights of all nodes and links, composing the path.
 boolean sameCycle(Path path)
          Determines whether the current path traverses the same nodes as the specified path in the same order, disregard which one is the starting node.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Path

public Path()

Path

public Path(Path p)
Method Detail

contains

public boolean contains(Node node)
Checks whether the specified node is a participant in the path.


contains

public boolean contains(Link link)
Checks whether the specified link is a participant in the path.


sameCycle

public boolean sameCycle(Path path)
Determines whether the current path traverses the same nodes as the specified path in the same order, disregard which one is the starting node.


getNodes

public NodeList getNodes()
Gets the list of all nodes connected by the path.


getLinks

public LinkList getLinks()
Gets a list of all links composing the path.


getItems

public java.util.ArrayList<java.lang.Object> getItems()
Gets a list with all items (nodes and links) composing the path.


getLength

public int getLength()
Gets the length of the path.


getWeight

public float getWeight(boolean incNodes,
                       boolean incLinks)
Gets the length of the path expressed as a sum of the weights of all nodes and links, composing the path.


add

public void add(Link link,
                Node node)
Append the node and the link to the path.


add

public void add(Node node)
Append the node to the path.