All Known Implementing Classes:
DefaultDistanceHelper

public interface DistanceHelper
Helper class provides unit recalculation
  • Method Summary

    Modifier and Type
    Method
    Description
    getDistanceStringForLocation(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

      String 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. In no distance unit is set in the store model default 'km' is assumed.
      Parameters:
      baseStoreModel - the base store model that provide distance unit
      distanceInKm - the distance in km
      Returns:
      the calculated distance string
    • getDistanceStringForLocation

      String getDistanceStringForLocation(String locationName, double distanceInKm)
      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 name
      distanceInKm - the distance in km
      Returns:
      the calculated distance string