Results 1 to 7 of 7
Thread: Adapter class
- 04-03-2014, 12:05 PM #1
Member
- Join Date
- Apr 2014
- Posts
- 1
- Rep Power
- 0
- 04-03-2014, 12:21 PM #2
Just a guy
- Join Date
- Jun 2013
- Location
- Netherlands
- Posts
- 5,114
- Rep Power
- 13
Re: Adapter class
You have to provide context. Where did you read it?
"Syntactic sugar causes cancer of the semicolon." -- Alan Perlis
- 04-03-2014, 12:26 PM #3
Member
- Join Date
- Apr 2014
- Posts
- 2
- Rep Power
- 0
Re: Adapter class
Adapter class is code of block which is complsory followed by users or made them compalsary used..
- 04-03-2014, 12:38 PM #4
Re: Adapter class
"It's not fixed until you stop calling the problem weird and you understand what was wrong." - gimbal2™ © 2013
- 04-03-2014, 03:43 PM #5
Senior Member
- Join Date
- Jan 2013
- Location
- Northern Virginia, United States
- Posts
- 6,226
- Rep Power
- 15
Re: Adapter class
The JavaTM Tutorials | SSCCE | Java Naming Conventions
Poor planning on your part does not constitute an emergency on my part
- 04-03-2014, 07:41 PM #6
Re: Adapter class
There is more than one meaning, but the most common meaning in Java is a class that provides empty implementations of all the methods in an interface. Users of the API can avoid clutter in their code by extending the adapter class instead of implementing the interface.
Get in the habit of using standard Java naming conventions!
- 04-03-2014, 08:54 PM #7
Senior Member
- Join Date
- Feb 2014
- Posts
- 219
- Rep Power
- 8
Re: Adapter class
A couple of examples on the Adapter class:
1. MouseAdapter
Take a look at the class description. See also the tutorial on writing a mouse listener making use of MouseAdapter.
2. WindowAdapter
Take a look at the class description. See also the tutorial on writing a window listener, and how WindowAdapter fits in.
Adapter classes can be used to ease the implementation of interfaces in general (i.e., not only for listener implementation.)
There is a another called the Adapter Design Pattern. It is one of the GoF (Gang of Four) design patterns, and it is applied to enable dissimilar interfaces to work together. See Adapter pattern - Wikipedia, the free encyclopedia.
Similar Threads
-
How to use variable in adapter class
By rasen58 in forum Java AppletsReplies: 2Last Post: 10-25-2012, 07:24 AM -
How to make adapter class between FileConnection and StorageConnection?
By mikezang in forum CLDC and MIDPReplies: 5Last Post: 08-07-2009, 01:54 PM -
JDBC using adapter (and connection handles)
By Gideonzx in forum Advanced JavaReplies: 1Last Post: 07-28-2009, 07:54 AM
Bookmarks