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 TypeMethodDescriptionvoidaddConnection(Connection connection) Adds anConnectionto the route.This extracts a list of connection IDs.This extracts a list ofConnections that vehicles using thisRouteare passing.getId()The id of this route.This extracts a list of all node IDs thisRoutepasses.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 anConnectionto the route.- Parameters:
connection- Connection to add.
-
getNodes
- Returns:
- Extracted nodes.
-
getNodeIds
This extracts a list of all node IDs thisRoutepasses.- Returns:
- Extracted list of all node IDs.
-
getConnections
This extracts a list ofConnections that vehicles using thisRouteare 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.
-