Adapter Pattern and Java Interfaces

I just thought that patterns actually do matter even in basic programming education. Consider Java Interfaces. I think it is important to be aware of the general concept of classes having interfaces to really use Java Interfaces. It might be useful approaching it from that side. Reading the chapter on the Adapter Pattern in GOF made me realize Java Interfaces are class adapters in GOF, allowing multiple inheritance only for classes without functionality. And then it really makes sense calling these Interfaces, yet it is unintuitive as a class thereby has many different Interfaces which together are the interface of the class.


About this entry