Created
November 21, 2017 21:42
-
-
Save asunwoo/55ede74602dfe92abd70fdd79975a4c5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Business Logic | |
//... | |
Variation variation = this.optimizelyClient.activate(experimentName, userId); | |
if(variation.is("CategoryProductSort")){ | |
CategoryComparator comparator = new CategoryComparator(); | |
Collections.sort(unSortedList, comparator); | |
} else if(variation.is("NameProductSort")){ | |
NameComparator comparator = new NameComparator(); | |
Collections.sort(unSortedList, comparator); | |
} else if(variation.is("PriceProductSort")){ | |
PriceComparator comparator = new PriceComparator(); | |
Collections.sort(unSortedList, comparator); | |
} | |
sort.sort(sampleProductList()); | |
//Continue Business Logic | |
//… |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment