adapter : Java Glossary

*0-9ABCDEFGHIJKLMNOPQRSTUVWXYZ (all)

adapter
An adapter is one of the classic design patterns. It is also a class in Java that implements an interface with a set of dummy methods. It lets you rapidly implement an interface. It also lets your class continue to work ever if the underlying interface acquires new methods. You can then subclass the adapter class and override just the methods you need. If you implemented the interface directly, you would have to write all the dummy methods yourself. Most commonly an adapter is used to help you rapidly construct your own Listener class to field events. By extending an adapter class, with KeyAdapter, FocusAdapter, WindowAdapter etc. you don’t have to write methods for events you are not interested in handling.

This page is posted
on the web at:

http://mindprod.com/jgloss/adapter.html

Optional Replicator mirror
of mindprod.com
on local hard disk J:

J:\mindprod\jgloss\adapter.html
Canadian Mind Products
Please the feedback from other visitors, or your own feedback about the site.
Contact Roedy. Please feel free to link to this page without explicit permission.

IP:[65.110.21.43]
Your face IP:[3.141.45.90]
You are visitor number