Implementing Class Adapter Pattern in Java

前端 未结 5 1081
失恋的感觉
失恋的感觉 2020-12-09 20:47

While reading up on the Class Adapter pattern in Head First Design Patterns, I came across this sentence:

class adapter... because you need multiple i

5条回答
  •  感情败类
    2020-12-09 21:14

    Yes, you can create a class adapter with an interface as long as you're only wrapping a single adaptee. With multiple inheritance you could take two or more adaptees and wrap them into a single interface.

提交回复
热议问题