Two Way Adapter

I'm a bit confused reading GoF, and I've seen what look like conflicting opinions in other literature on the TwoWayAdapter.

Say I have two classes A and B. Is the point to have a two-way adapter that can play the role of two interfaces at once (say, wrapping a B with an A interface, but also exposing the B interface if needed), or to have an adapter that can adapt an A to a B or a B to an A? Bob Tarr's examples would seem to indicate the latter:

http://www.research.umbc.edu/~tarr/dp/lectures/Adapter.pdf

---


EditText of this page (last edited August 18, 2004) or FindPage with title or text search