Package | com.yworks.yfiles.layout.router.polyline |
Class | public class Path |
Inheritance | Path YObject Object |
Path
represents the result of a path search as a list of consecutive com.yworks.yfiles.layout.router.polyline.CellEntrance s.
A Path starts with an entrance into a com.yworks.yfiles.layout.router.polyline.PartitionCell of the source node and ends with one into a com.yworks.yfiles.layout.router.polyline.PartitionCell of the target node.
See also
Property | Defined By | ||
---|---|---|---|
cost : Number [read-only]
Returns the overall cost of this path. | Path | ||
edge : Edge [read-only]
Returns the edge this path was calculated for. | Path |
Method | Defined By | ||
---|---|---|---|
Creates a new instance. | Path | ||
equals(o:Object):Boolean | YObject | ||
getClass():Class [override] | Path | ||
getEntrance(position:int):CellEntrance
Returns the com.yworks.yfiles.layout.router.polyline.CellEntrance at the given position of this path. | Path | ||
hashCode():int | YObject | ||
length():int
Returns the count of com.yworks.yfiles.layout.router.polyline.CellEntrance objects this path consists of. | Path | ||
[static]
Creates a new instance. | Path | ||
positionOf(entrance:CellEntrance):int
Returns the position of the first occurrence of the given com.yworks.yfiles.layout.router.polyline.CellEntrance in this path, or -1 if this path does not contain the com.yworks.yfiles.layout.router.polyline.CellEntrance. | Path | ||
setEntrance(position:int, entrance:CellEntrance):void
Replaces the com.yworks.yfiles.layout.router.polyline.CellEntrance at the given position of this path with the given com.yworks.yfiles.layout.router.polyline.CellEntrance. | Path |
Method | Defined By | ||
---|---|---|---|
Initializes this object. | Path |
cost | property |
cost:Number
[read-only] Returns the overall cost of this path.
public function get cost():Number
edge | property |
edge:Edge
[read-only] Returns the edge this path was calculated for.
public function get edge():Edge
Path | () | Constructor |
public function Path(edge:Edge, entrances:List, cost:Number, init:Boolean = true)
Creates a new instance.
Parametersedge:Edge — The edge the path was calculated for.
| |
entrances:List — A list of com.yworks.yfiles.layout.router.polyline.CellEntrance objects describing the edge path from source node to target node.
| |
cost:Number — The overall cost of this path.
| |
init:Boolean (default = true ) — An internally used switch to help handle proper instance initialization in inheritance chains where classes can have multiple constructor-like factory methods.
This parameter can safely be ignored/omitted when calling the constructor.
|
See also
getClass | () | method |
override public function getClass():Class
ReturnsClass |
getEntrance | () | method |
public function getEntrance(position:int):CellEntrance
Returns the com.yworks.yfiles.layout.router.polyline.CellEntrance at the given position of this path.
Parameters
position:int — position of the com.yworks.yfiles.layout.router.polyline.CellEntrance to return
|
CellEntrance — the com.yworks.yfiles.layout.router.polyline.CellEntrance at the given position of this path
|
See also
initPath | () | method |
protected final function initPath(edge:Edge, entrances:List, cost:Number):void
Initializes this object. See the documentation of the corresponding factory method newPath()
for details.
Parameters
edge:Edge | |
entrances:List | |
cost:Number |
See also
length | () | method |
public function length():int
Returns the count of com.yworks.yfiles.layout.router.polyline.CellEntrance objects this path consists of.
Returnsint — The count of com.yworks.yfiles.layout.router.polyline.CellEntrance objects this path consists of.
|
See also
newPath | () | method |
public static function newPath(edge:Edge, entrances:List, cost:Number):Path
Creates a new instance.
Parameters
edge:Edge — The edge the path was calculated for.
| |
entrances:List — A list of com.yworks.yfiles.layout.router.polyline.CellEntrance objects describing the edge path from source node to target node.
| |
cost:Number — The overall cost of this path.
|
Path |
See also
positionOf | () | method |
public function positionOf(entrance:CellEntrance):int
Returns the position of the first occurrence of the given com.yworks.yfiles.layout.router.polyline.CellEntrance in this path, or -1 if this path does not contain the com.yworks.yfiles.layout.router.polyline.CellEntrance.
Parameters
entrance:CellEntrance — com.yworks.yfiles.layout.router.polyline.CellEntrance to search for
|
int — the position of the first occurrence of the given com.yworks.yfiles.layout.router.polyline.CellEntrance in this path, or -1 if this path does not contain the com.yworks.yfiles.layout.router.polyline.CellEntrance
|
See also
setEntrance | () | method |
public function setEntrance(position:int, entrance:CellEntrance):void
Replaces the com.yworks.yfiles.layout.router.polyline.CellEntrance at the given position of this path with the given com.yworks.yfiles.layout.router.polyline.CellEntrance.
Parameters
position:int — position of the com.yworks.yfiles.layout.router.polyline.CellEntrance to replace
| |
entrance:CellEntrance — com.yworks.yfiles.layout.router.polyline.CellEntrance to be stored at the given position
|
See also