Class Route
- java.lang.Object
-
- org.eclipse.mosaic.lib.database.route.Route
-
public class Route extends Object
This is a complete route that can be driven by a vehicle.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addConnection(Connection connection)
Adds anConnection
to the route.List<String>
getConnectionIds()
This extracts a list of connection IDs.List<Connection>
getConnections()
This extracts a list ofConnection
s that vehicles using thisRoute
are passing.String
getId()
The id of this route.List<String>
getNodeIds()
This extracts a list of all node IDs thisRoute
passes.List<Node>
getNodes()
-
-
-
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 anConnection
to the route.- Parameters:
connection
- Connection to add.
-
getNodeIds
@Nonnull public List<String> getNodeIds()
This extracts a list of all node IDs thisRoute
passes.- Returns:
- Extracted list of all node IDs.
-
getConnections
@Nonnull public List<Connection> getConnections()
This extracts a list ofConnection
s that vehicles using thisRoute
are passing. Multiple adjacent edges belonging to the same connection will result in only one occurrence of the connection.- Returns:
- Extracted nodes.
-
-