|
Search this API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object y.layout.router.polyline.Path
public class Path
A Path
represents the result of a path search as a list of consecutive CellEntrance
s. A Path
starts with an entrance into a PartitionCell
of the source node and ends with one into a PartitionCell
of the target node.
PathSearch
,
PathSearchResult
Constructor Summary | |
---|---|
Path(Edge edge,
List entrances,
double cost)
Creates a new instance. |
Method Summary | |
---|---|
double |
getCost()
Returns the overall cost of this path. |
Edge |
getEdge()
Returns the edge this path was calculated for. |
CellEntrance |
getEntrance(int position)
Returns the CellEntrance at the given position of this path. |
int |
length()
Returns the count of CellEntrance objects this path consists of. |
int |
positionOf(CellEntrance entrance)
Returns the position of the first occurrence of the given CellEntrance in this path, or -1 if this path
does not contain the CellEntrance . |
void |
setEntrance(int position,
CellEntrance entrance)
Replaces the CellEntrance at the given position of this path with the given CellEntrance . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Path(Edge edge, List entrances, double cost)
edge
- The edge the path was calculated for.entrances
- A list of CellEntrance
objects describing the edge path from source node to target node.cost
- The overall cost of this path.Method Detail |
---|
public Edge getEdge()
public double getCost()
public CellEntrance getEntrance(int position)
CellEntrance
at the given position of this path.
position
- position of the CellEntrance
to return
CellEntrance
at the given position of this pathpublic void setEntrance(int position, CellEntrance entrance)
CellEntrance
at the given position of this path with the given CellEntrance
.
position
- position of the CellEntrance
to replaceentrance
- CellEntrance
to be stored at the given positionpublic int positionOf(CellEntrance entrance)
CellEntrance
in this path, or -1 if this path
does not contain the CellEntrance
.
entrance
- CellEntrance
to search for
CellEntrance
in this path, or -1 if this path
does not contain the CellEntrance
public int length()
CellEntrance
objects this path consists of.
CellEntrance
objects this path consists of.
|
© Copyright 2000-2013, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |