Class DefaultDistanceHelper

    • Field Detail

      • IMPERIAL_DISTANCE_RATIO

        public static final double IMPERIAL_DISTANCE_RATIO
        See Also:
        Constant Field Values
    • Constructor Detail

      • DefaultDistanceHelper

        public DefaultDistanceHelper()
    • Method Detail

      • getDistanceUnit

        protected java.lang.String getDistanceUnit​(DistanceUnit distanceUnit)
      • getDistance

        protected java.lang.Double getDistance​(DistanceUnit distanceUnit,
                                               double distanceInKm)
      • getDistanceStringForStore

        public java.lang.String getDistanceStringForStore​(BaseStoreModel baseStoreModel,
                                                          double distanceInKm)
        Description copied from interface: DistanceHelper
        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.
        Specified by:
        getDistanceStringForStore in interface DistanceHelper
        Parameters:
        baseStoreModel - the base store model that provide distance unit
        distanceInKm - the distance in km
        Returns:
        the calculated distance string
      • getDistanceStringForLocation

        public java.lang.String getDistanceStringForLocation​(java.lang.String locationName,
                                                             double distanceInKm)
        Description copied from interface: DistanceHelper
        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.
        Specified by:
        getDistanceStringForLocation in interface DistanceHelper
        Parameters:
        locationName - the location name
        distanceInKm - the distance in km
        Returns:
        the calculated distance string
      • setPointOfServiceService

        public void setPointOfServiceService​(PointOfServiceService pointOfServiceService)
      • setEnumerationService

        public void setEnumerationService​(EnumerationService enumerationService)