You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To separate strategies and to enable fast switching between them. Also this pattern is a good alternative to inheritance (instead of having an abstract class that is extended).
12
+
13
+
## Examples
14
+
15
+
* sorting a list of objects, one strategy by date, the other by id
16
+
* simplify unit testing: e.g. switching between file and in-memory storage
0 commit comments