Created
May 1, 2016 21:08
-
-
Save MafaldaLandeiro/2ae59af54360cef0e07d09933d7f754d to your computer and use it in GitHub Desktop.
Context
This file contains hidden or 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
| import java.util.List; | |
| import strategyPattern.strategy.SortAlgorithm; | |
| public class Context { | |
| private SortAlgorithm sortAlgorithm; | |
| /** | |
| * @param sortAlgorithm | |
| */ | |
| public Context(SortAlgorithm sortAlgorithm) { | |
| super(); | |
| this.sortAlgorithm = sortAlgorithm; | |
| } | |
| public void executeSort(List<Integer> unsorted){ | |
| sortAlgorithm.sort(unsorted); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment