March 2002
Intermediate to advanced
496 pages
8h 51m
English
Adapters are healthier when a Java interface narrows the responsibility that the adapter class bears to the client. The JTable class, for example, specifies the exact interface it needs with the TableModel interface. By comparison, the MessageAdapter class has no contract with the application it plugs into that the application won't expand its use of a PrintStream object's behavior. In fact, although the word adapter appears in the name of the MessageAdapter class, you might question whether MessageAdapter is an instance of the ADAPTER pattern.
|
In answering Challenge 2.4, you explained the value of the ...
Read now
Unlock full access