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. 
> Java 1.6 don't seems to support generic type in methods
Java 6 does support this, the compiler is just not good when it comes to type inference, so you often have to hint the type