Interface IHighwayMatrix

    • Method Detail

      • getPath

        RoutePath getPath​(int idFrom,
                          org.eclipse.draw2d.geometry.Point start,
                          int idTo,
                          org.eclipse.draw2d.geometry.Point end)
        Finds the path
        Parameters:
        idFrom - the identifier of the starting highway
        start - the start point
        idTo - the identifier of the ending highway
        end - the end point and required direction from from this point
        Returns:
        finded path
        See Also:
        RoutePath
      • getHighways

        Iterable<Highway> getHighways()
        Gets the highways iterator
        Returns:
        the highways iterator
      • addHighway

        int addHighway​(Highway highway)
        Add the specified highway to the highways collection.
        Parameters:
        highway - - the highway to be added to this matrix
        Returns:
        the identifier of the highway to be added
      • removeHighway

        Highway removeHighway​(int identifier)
        Removes the of the specified highway from highways collection.
        Parameters:
        identifier - - the identifier of the highway to be removed
        Returns:
        the highway that was removed from the matrix
      • getHighway

        Highway getHighway​(int identifier)
        Returns the highway using the specified identifier.
        Parameters:
        identifier - - identifier of the highway to return
        Returns:
        the highway at the specified position in this list
        Throws:
        RuntimeException - in case invalid identifier
      • getIdentifier

        int getIdentifier​(Highway highway)
        Returns the identifier of the specified highway, or -1 if highways collection does not contain the element.
        Parameters:
        highway - - element to search for
        Returns:
        the identifier of the specified highway, or -1 if highways collection does not contain the element.
        Throws:
        NullPointerException - if the specified element is null