Class RouteDistanceAndTimeCache
java.lang.Object
slash.navigation.converter.gui.models.RouteDistanceAndTimeCache
- All Implemented Interfaces:
RouteMetadataSource
An in-memory, session-scoped cache of
DistanceAndTimes keyed by route URL.
Survives category navigation, cleared on restart.- Author:
- Christian Pesch
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetDistanceAndTime(String url) Returns the known distance and time for the route with the given URL.voidput(String url, DistanceAndTime distanceAndTime)
-
Constructor Details
-
RouteDistanceAndTimeCache
public RouteDistanceAndTimeCache()
-
-
Method Details
-
getDistanceAndTime
Description copied from interface:RouteMetadataSourceReturns the known distance and time for the route with the given URL.- Specified by:
getDistanceAndTimein interfaceRouteMetadataSource- Parameters:
url- the URL of the route- Returns:
- the distance and time or null if this source does not know the route