Class AbstractResultSortingStrategy
java.lang.Object
de.hybris.platform.travelfacades.fare.sorting.strategies.AbstractResultSortingStrategy
- Direct Known Subclasses:
ArrivalTimeSortingStrategy,DepartureTimeSortingStrategy,NumberOfStopsSortingStrategy,PriceSortingStrategy,TravelTimeSortingStrategy
Abstract strategy to sort the FareSelectionData
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected intCommon method used to compare two PricedItineraryData based on the departureDateabstract voidsortFareSelectionData(FareSelectionData fareSelectionData) Method to sort the FareSelectionData
-
Constructor Details
-
AbstractResultSortingStrategy
public AbstractResultSortingStrategy()
-
-
Method Details
-
sortFareSelectionData
Method to sort the FareSelectionData- Parameters:
fareSelectionData- as the FareSelectionData to be sorted
-
comparePricedItineraryByDepartureDate
protected int comparePricedItineraryByDepartureDate(PricedItineraryData pIt1, PricedItineraryData pIt2) Common method used to compare two PricedItineraryData based on the departureDate- Parameters:
pIt1- as the first PricedItineraryDatapIt2- as the second PricedItineraryData- Returns:
- int if pIt1 is equals to pIt2 0 is returned, if pIt1 greater than pIt2 an int > 0 is returned, if pIt1 less than pIt2 an int < 0 is returned
-