Interface DistanceHelper

  • All Known Implementing Classes:
    DefaultDistanceHelper

    public interface DistanceHelper
    Helper class provides unit recalculation
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.String getDistanceStringForLocation​(java.lang.String locationName, double distanceInKm)
      Gets the distance string for given distance value and the distance unit that is set in corresponding base store model.
      java.lang.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.
    • Method Detail

      • getDistanceStringForStore

        java.lang.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

        java.lang.String getDistanceStringForLocation​(java.lang.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