About 97,400 results
Open links in new tab
  1. java - Real World Example of the Strategy Pattern - Stack Overflow

    One common usage of the strategy pattern is to define custom sorting strategies (in languages without higher-order functions), e.g. to sort a list of strings by length in Java, passing an anonymous inner …

  2. How does the Strategy Pattern work? - Stack Overflow

    Sep 18, 2008 · The strategy pattern is intended to provide a means to define a family of algorithms, encapsulate each one as an object, and make them interchangeable. The strategy pattern lets the …

  3. java - Difference between Strategy pattern and Command pattern

    Jan 29, 2011 · What is the difference between the Strategy pattern and the Command pattern? I am also looking for some examples in Java.

  4. What is the difference between Strategy design pattern and State …

    What are the differences between the Strategy design pattern and the State design pattern? I was going through quite a few articles on the web but could not make out the difference clearly. Can so...

  5. java - Polymorphism vs Strategy pattern - Stack Overflow

    Jul 24, 2015 · If java.util Comparator#compare is an example of the strategy pattern, then is the strategy pattern and polymorphism one and the same thing? If yes, then what is the difference between …

  6. What is the difference between the template method and the strategy ...

    Mar 21, 2009 · Template method pattern is good at clarify the overall algorithm steps, however Strategy pattern is suitable for flexibility and reusibility, so you can combine strageties together if you need, …

  7. java - What is the difference between Factory and Strategy patterns ...

    Feb 14, 2016 · A factory pattern is a creational pattern. A strategy pattern is an operational pattern. Put another way, a factory pattern is used to create objects of a specific type. A strategy pattern is use to …

  8. java - Strategy Pattern with different parameters - Stack Overflow

    Nov 14, 2013 · The strategy pattern can be used to host different algorithms which either have no parameters or the set of parameters for each algorithm is the same. However, it falls short if various …

  9. When and why should the Strategy Pattern be used?

    Nov 10, 2009 · The strategy pattern is useful in situations where you (or users of your code) may want to change calculations in your algorithms. A simple example where I have used the strategy pattern is …

  10. Strategy Pattern V/S Decorator Pattern - Stack Overflow

    Oct 17, 2014 · I just came across two patterns. Strategy Pattern Decorator Strategy Pattern :- Strategy pattern gives several algorithms that can be used to perform particular operation or task.