Class CompositeRouteMetadataSource

java.lang.Object
slash.navigation.converter.gui.models.CompositeRouteMetadataSource
All Implemented Interfaces:
RouteMetadataSource

public class CompositeRouteMetadataSource extends Object implements RouteMetadataSource
Queries multiple RouteMetadataSources in the given order; the first source that knows the route wins.
Author:
Christian Pesch
  • Constructor Details

    • CompositeRouteMetadataSource

      public CompositeRouteMetadataSource(RouteMetadataSource... sources)
  • Method Details

    • getDistanceAndTime

      public DistanceAndTime getDistanceAndTime(String url)
      Description copied from interface: RouteMetadataSource
      Returns the known distance and time for the route with the given URL.
      Specified by:
      getDistanceAndTime in interface RouteMetadataSource
      Parameters:
      url - the URL of the route
      Returns:
      the distance and time or null if this source does not know the route