Changes

Jump to: navigation, search

Adapter

149 bytes added, 22:27, 25 February 2007
Adapter Design Pattern
A good analogy for the Adapter pattern would be the adapter's commonly used to convert the voltage of Canadian/U.S made appliances to be used in different countries. In this case, the appliance ('''Target''') is using the adapter ('''Adapter''') to reuse the socket ('''Adaptee''') already in place.
There are two specific types of adapter patterns - ''object adapter pattern'' and ''class adapter pattern''. The latter uses multiple inheritance whereas the former uses an instance of the reuseable class it wants to adapt. Between the two, object adapter pattern is the favored one due to the fact that popular languages such as Java do not support multiple inheritance.
== Object Adapter Pattern ==
1
edit

Navigation menu