make code compiles with jdk 6

This pull request closes #58 it changes the code so that it compiles with jdk 6 instead of 7. 
Unfortunately, no. Java 1.6 don't seems to support generic type in methods and the only solution I have found is the same of yours.

> By the way it seems to work for you because you compile the project with the jdk 7, right? The error just appears while compiling it with the jdk 6

Facepalm for me. :)