Class Route
java.lang.Object
org.eclipse.mosaic.lib.database.route.Route
This is a complete route that can be driven by a vehicle.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addConnection
(Connection connection) Adds anConnection
to the route.This extracts a list of connection IDs.This extracts a list ofConnection
s that vehicles using thisRoute
are passing.getId()
The id of this route.This extracts a list of all node IDs thisRoute
passes.getNodes()
-
Constructor Details
-
Route
Default constructor.- Parameters:
id
- Id of the route.
-
-
Method Details
-
getId
The id of this route.- Returns:
- Id of the route.
-
addConnection
Adds anConnection
to the route.- Parameters:
connection
- Connection to add.
-
getNodes
- Returns:
- Extracted nodes.
-
getNodeIds
This extracts a list of all node IDs thisRoute
passes.- Returns:
- Extracted list of all node IDs.
-
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.
-
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.
-