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 void
addLightpaths(LightPath[] lightpaths)
Add lightptahs in this pathint
getBW()
int
getBWAvailable()
int
getDestination()
Retrieves the destination node of this pathLightPath[]
getLightpaths()
Returns the list of lightpaths that belong to a given Path.int
getSource()
Retrieves the source node of this pathboolean
hasLightpath(LightPath lp)
Retrieves if this Path has this lightpath or not.void
resetPath()
This method is only for clear a pathjava.lang.String
toString()
java.lang.String
toTrace()
-
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:
toString
in classjava.lang.Object
-
toTrace
public java.lang.String toTrace()
-