Interface DistanceHelper
- All Known Implementing Classes:
DefaultDistanceHelper
public interface DistanceHelper
Helper class provides unit recalculation
-
Method Summary
Modifier and TypeMethodDescriptiongetDistanceStringForLocation(String locationName, double distanceInKm) Gets the distance string for given distance value and the distance unit that is set in corresponding base store model.getDistanceStringForStore(BaseStoreModel baseStoreModel, double distanceInKm) Gets the distance string for given distance value and the distance unit that is set in the base store model.
-
Method Details
-
getDistanceStringForStore
Gets the distance string for given distance value and the distance unit that is set in the base store model. In no distance unit is set in the store model default 'km' is assumed.- Parameters:
baseStoreModel- the base store model that provide distance unitdistanceInKm- the distance in km- Returns:
- the calculated distance string
-
getDistanceStringForLocation
Gets the distance string for given distance value and the distance unit that is set in corresponding base store model. If no distance unit is set in the store model default 'km' is assumed.- Parameters:
locationName- the location namedistanceInKm- the distance in km- Returns:
- the calculated distance string
-