|
Inner Classes: Adapters Where You Need Them |
|
A client creates an adapter to conform to an external API |
|
|
|
An inner class is local to another class or a block |
|
|
It has direct access to local variables and methods |
|
|
...Yet it can implement or extend any desired type |
|