Archives for May 4th, 2008

No more downcasting via “Recursive Bounds”

Sunday, May 4th, 2008

I recently coded a fairly tiny application that made use of the MVC pattern. One of the things that I noticed while I was writing it was that I was down-casting a lot. Imagine something like this:
Example

// main type
interface Model {
void someMethod();
}

// implementation
class Mixer implements Model {
public void anotherMethod(){
[...]

patterns, programming | No Comments

 

May 2008
M T W T F S S
« Apr   Jun »
 1234
567891011
12131415161718
19202122232425
262728293031  

Categories

Archives

Tags