Strategy
Intent
,
Motivation
,
Applicability
,
Structure
, Participants,
Collaborations
,
Consequences
,
Implementation
,
Sample Code
,
Known Uses
,
Related Patterns
Participants
Strategy
(Compositor)
declares an interface common to all supported algorithms. Context uses this interface to call the algorithm defined by a ConcreteStrategy.
ConcreteStrategy
(SimpleCompositor, TeXCompositor, ArrayCompositor)
implements the algorithm using the Strategy interface.
Context
(Composition)
is configured with a ConcreteStrategy object.
maintains a reference to a Strategy object.
may define an interface that lets Strategy access its data.
Participants of
Abstract Factory
,
Adapter
,
Bridge
,
Builder
,
Chain of Responsibility
,
Command
,
Composite
,
Decorator
,
Facade
,
Factory Method
,
Flyweight
,
Interpreter
,
Iterator
,
Mediator
,
Memento
,
Observer
,
Prototype
,
Proxy
,
Singleton
,
State
, Strategy,
Template Method
,
Visitor