Class TransitNetwork
java.lang.Object
id.klacak.bus_navigator.TransitNetwork
In-memory collection of the stops and routes in a transit system.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a route to the network.voidAdds a stop to the network.Finds a route by its short code, ignoring case.Finds a stop by name, ignoring case.Gets all routes registered in this network.getStops()Gets all stops registered in this network.
-
Constructor Details
-
TransitNetwork
public TransitNetwork()Creates an empty transit network.
-
-
Method Details
-
findStop
-
findRoute
-
getStops
-
getRoutes