Package ons
Class Path
java.lang.Object
ons.Path
public class Path
extends java.lang.Object
A path is nothing more than a list of lightpaths.
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description voidaddLightpaths(LightPath[] lightpaths)Add lightptahs in this pathintgetBW()intgetBWAvailable()intgetDestination()Retrieves the destination node of this pathLightPath[]getLightpaths()Returns the list of lightpaths that belong to a given Path.intgetSource()Retrieves the source node of this pathbooleanhasLightpath(LightPath lp)Retrieves if this Path has this lightpath or not.voidresetPath()This method is only for clear a pathjava.lang.StringtoString()java.lang.StringtoTrace()
-
Constructor Details
-
Path
Creates a new Path object.- Parameters:
lightpaths- list of LightPath objects that form the Path
-
-
Method Details
-
resetPath
public void resetPath()This method is only for clear a path -
getLightpaths
Returns the list of lightpaths that belong to a given Path.- Returns:
- lightpaths list of LightPath objects that form the Path
-
hasLightpath
Retrieves if this Path has this lightpath or not.- Parameters:
lp- the lightpath- Returns:
- true if this Path has this lightpath or not, false otherwise
-
addLightpaths
Add lightptahs in this path- Parameters:
lightpaths- lightpaths list of LightPath objects
-
getSource
public int getSource()Retrieves the source node of this path- Returns:
- the source node of this path, the source of the first lightpaths in this path
-
getDestination
public int getDestination()Retrieves the destination node of this path- Returns:
- the destination node of this path, the destination of the last lightpaths in this path
-
getBWAvailable
public int getBWAvailable() -
getBW
public int getBW() -
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-
toTrace
public java.lang.String toTrace()
-