File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes adapter-pattern Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "adapter-pattern" Watch "adapter-pattern" New topic
Author

adapter-pattern

abalfazl hossein
Ranch Hand

Joined: Sep 06, 2007
Posts: 635
http://www.avajava.com/tutorials/lessons/adapter-pattern.html?page=2

I wanted to learn adapter-pattern. I read that tutorial,...

I know adapter pattern is like real adapter,:

1-What does this mean?
In the Adapter Design Pattern, a class converts the interface of one class to be what another class expects.


http://www.fluffycat.com/Java-Design-Patterns/Adapter/

2-
http://www.avajava.com/tutorials/lessons/adapter-pattern.html?page=2

TemperatureClassReporter is a class adapter.

...TemperatureObjectReporter is an object adapter.


class adapter and object adapter?!!

May someone explain more about this tutorial?
Madhan Sundararajan Devaki
Ranch Hand

Joined: Mar 18, 2011
Posts: 312

Answer to question 1 is as follows,

Now if you implement the WindowListener interface, you need to implement all the methods declared in the WindowListener interface. However, if you extend the WindowAdapter class you may over-ride only the required methods.


S.D. MADHAN
Not many get the right opportunity !
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: adapter-pattern