Search this API

y.layout.router.polyline
Class PathSearchResult

java.lang.Object
  extended by y.layout.router.polyline.PathSearchResult

public class PathSearchResult
extends Object

Manages the best Paths found for each edge and provides according EdgeInfos. These are used by the ChannelBasedPathRouting algorithm to calculate the final segment locations for the segments of an edge path.


Constructor Summary
PathSearchResult(PathSearchConfiguration configuration)
          Creates a new instance.
 
Method Summary
 EdgeInfo getEdgeInfo(Edge edge)
          Returns an EdgeInfo for the given edge.
 EdgeInfo getEdgeInfo(Path path)
          Returns an EdgeInfo for the given path.
 Path getPath(Edge edge)
          Returns the earlier registered found path for the edge.
 void setPath(Edge edge, Path path)
          Sets a found path for an edge.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PathSearchResult

public PathSearchResult(PathSearchConfiguration configuration)
Creates a new instance.

Parameters:
configuration - The configuration used for the path search.
Method Detail

getEdgeInfo

public EdgeInfo getEdgeInfo(Path path)
Returns an EdgeInfo for the given path.

If no EdgeInfo has been created for this path by this context before, a new one is instantiated, otherwise the stored one is returned.

Parameters:
path - The path to return the EdgeInfo for.
Returns:
An EdgeInfo describing this path.

getEdgeInfo

public EdgeInfo getEdgeInfo(Edge edge)
Returns an EdgeInfo for the given edge.

If the given edge shall be routed but no path has been set for, yet, null is returned. If no EdgeInfo has been created for the path by this context before, a new one is instantiated, otherwise the stored one is returned.

Parameters:
edge - The edge to return the EdgeInfo.
Returns:
An EdgeInfo describing this the path of the edge.
See Also:
setPath(y.base.Edge, Path)

setPath

public void setPath(Edge edge,
                    Path path)
Sets a found path for an edge.

Parameters:
edge - The edge to set the path for.
path - The found path.

getPath

public Path getPath(Edge edge)
Returns the earlier registered found path for the edge.

Parameters:
edge - The edge to provide the found path for.
Returns:
The earlier registered found path for the edge or null, if no path has been registered, yet.

© Copyright 2000-2013,
yWorks GmbH.
All rights reserved.