Taufiq Abdur Rahman
Taufiq Abdur Rahman

Reputation: 1388

How to properly design an Adapter pattern

I have an Application where I want to Implement an Adapter pattern. I have different types of sources for which there are different Adapter and there can be multiple sources of single type. The question is do I instantiate a single Adapter for each type or individual sources? Also why?

Upvotes: 0

Views: 62

Answers (1)

mcintyre321
mcintyre321

Reputation: 13306

For each source, you would want to create an instance. If several sources are of the same kind, you would probably create several instances of the same Type.

Upvotes: 2

Related Questions