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

    Constructors 
    Constructor Description
    Path​(LightPath[] lightpaths)
    Creates a new Path object.
  • Method Summary

    Modifier and Type Method Description
    void addLightpaths​(LightPath[] lightpaths)
    Add lightptahs in this path
    int getBW()  
    int getBWAvailable()  
    int getDestination()
    Retrieves the destination node of this path
    LightPath[] getLightpaths()
    Returns the list of lightpaths that belong to a given Path.
    int getSource()
    Retrieves the source node of this path
    boolean hasLightpath​(LightPath lp)
    Retrieves if this Path has this lightpath or not.
    void resetPath()
    This method is only for clear a path
    java.lang.String toString()  
    java.lang.String toTrace()  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Path

      public Path​(LightPath[] lightpaths)
      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

      public LightPath[] getLightpaths()
      Returns the list of lightpaths that belong to a given Path.
      Returns:
      lightpaths list of LightPath objects that form the Path
    • hasLightpath

      public boolean hasLightpath​(LightPath lp)
      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

      public void addLightpaths​(LightPath[] lightpaths)
      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 class java.lang.Object
    • toTrace

      public java.lang.String toTrace()