public class DefaultDistanceHelper extends java.lang.Object implements DistanceHelper
| Modifier and Type | Field and Description |
|---|---|
static double |
IMPERIAL_DISTANCE_RATIO |
| Constructor and Description |
|---|
DefaultDistanceHelper() |
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.Double |
getDistance(DistanceUnit distanceUnit,
double distanceInKm) |
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.
|
protected java.lang.String |
getDistanceUnit(DistanceUnit distanceUnit) |
protected EnumerationService |
getEnumerationService() |
protected PointOfServiceService |
getPointOfServiceService() |
void |
setEnumerationService(EnumerationService enumerationService) |
void |
setPointOfServiceService(PointOfServiceService pointOfServiceService) |
public static final double IMPERIAL_DISTANCE_RATIO
protected java.lang.String getDistanceUnit(DistanceUnit distanceUnit)
protected java.lang.Double getDistance(DistanceUnit distanceUnit, double distanceInKm)
public java.lang.String getDistanceStringForStore(BaseStoreModel baseStoreModel, double distanceInKm)
DistanceHelpergetDistanceStringForStore in interface DistanceHelperbaseStoreModel - the base store model that provide distance unitdistanceInKm - the distance in kmpublic java.lang.String getDistanceStringForLocation(java.lang.String locationName,
double distanceInKm)
DistanceHelpergetDistanceStringForLocation in interface DistanceHelperlocationName - the location namedistanceInKm - the distance in kmprotected PointOfServiceService getPointOfServiceService()
public void setPointOfServiceService(PointOfServiceService pointOfServiceService)
protected EnumerationService getEnumerationService()
public void setEnumerationService(EnumerationService enumerationService)
Copyright © 2018 SAP SE. All Rights Reserved.