Package org.eclipse.mosaic.lib.routing
Class RoutingResponse
- java.lang.Object
-
- org.eclipse.mosaic.lib.routing.RoutingResponse
-
public class RoutingResponse extends Object
Class containing the response for a routing request. Gathers information in one object.
-
-
Constructor Summary
Constructors Constructor Description RoutingResponse(CandidateRoute bestRoute, List<CandidateRoute> alternativeRoutes)
Creates a routing response to the routing request with the bestCandidateRoute
and the alternative routes.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<CandidateRoute>
getAlternativeRoutes()
Returns alternative route(s) excluding the best one.CandidateRoute
getBestRoute()
Returns the "best" route in regards to the given cost function.
-
-
-
Constructor Detail
-
RoutingResponse
public RoutingResponse(CandidateRoute bestRoute, List<CandidateRoute> alternativeRoutes)
Creates a routing response to the routing request with the bestCandidateRoute
and the alternative routes.- Parameters:
bestRoute
- The best route based on the cost function.alternativeRoutes
- List of alternative routes.
-
-
Method Detail
-
getAlternativeRoutes
public final List<CandidateRoute> getAlternativeRoutes()
Returns alternative route(s) excluding the best one.- Returns:
- List for alternative routes in addition to the best route.
-
getBestRoute
public final CandidateRoute getBestRoute()
Returns the "best" route in regards to the given cost function. Alternative routes can be obtained via getAlternativeRoutes().- Returns:
- The best route in terms of costs.
-
-