Class Route


  • public class Route
    extends Object
    This is a complete route that can be driven by a vehicle.
    • Constructor Detail

      • Route

        public Route​(@Nonnull
                     String id)
        Default constructor.
        Parameters:
        id - Id of the route.
    • Method Detail

      • getId

        @Nonnull
        public String getId()
        The id of this route.
        Returns:
        Id of the route.
      • addConnection

        public void addConnection​(@Nonnull
                                  Connection connection)
        Adds an Connection to the route.
        Parameters:
        connection - Connection to add.
      • getNodes

        @Nonnull
        public List<Node> getNodes()
        This extracts a list of Nodes that vehicles using this Route are passing.
        Returns:
        Extracted nodes.
      • getNodeIds

        @Nonnull
        public List<String> getNodeIds()
        This extracts a list of all node IDs this Route passes.
        Returns:
        Extracted list of all node IDs.
      • getConnections

        @Nonnull
        public List<Connection> getConnections()
        This extracts a list of Connections that vehicles using this Route are passing. Multiple adjacent edges belonging to the same connection will result in only one occurrence of the connection.
        Returns:
        Extracted nodes.
      • getConnectionIds

        @Nonnull
        public List<String> getConnectionIds()
        This extracts a list of connection IDs. Multiple adjacent edges belonging to the same connection will result in only one occurrence of the connection.
        Returns:
        Extracted list of connection Ids.