|
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 a CellEntrance
for a PartitionCell
of the source node and ends with one for a PartitionCell
of the target node.
PathSearch
,
PathSearchResult
Constructor Summary | |
---|---|
Path(java.util.List entrances,
double cost)
Creates a new instance of Path for the given edge, cell entrances and cost. |
Method Summary | |
---|---|
double |
getCost()
Returns the overall cost of this path. |
CellEntrance |
getEntrance(int position)
Returns the CellEntrance at the given position of this path. |
int |
length()
Returns the number of CellEntrance objects in this path. |
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 this 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(java.util.List entrances, double cost)
Path
for the given edge, cell entrances
and cost.
entrances
- the list of CellEntrance
objects describing the edge path from source node to target nodecost
- the overall cost of this pathMethod Detail |
---|
public double getCost()
public CellEntrance getEntrance(int position)
CellEntrance
at the given position of this path.
position
- the position of the CellEntrance
to return
CellEntrance
at the given position of this pathsetEntrance(int, CellEntrance)
public void setEntrance(int position, CellEntrance entrance)
CellEntrance
at the given position of this path with the given CellEntrance
.
position
- the position of the CellEntrance
to replaceentrance
- the CellEntrance
to be stored at the given positiongetEntrance(int)
public int positionOf(CellEntrance entrance)
CellEntrance
in this path, or -1
if
this path does not contain this CellEntrance
.
entrance
- the CellEntrance
for which the position is retrieved
CellEntrance
in this path, or -1
if
this path does not contain this CellEntrance
public int length()
CellEntrance
objects in this path.
CellEntrance
objects in this path
|
© Copyright 2000-2022, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |