Your Java version in Eclipse is set to 1.4, generics in java were introduced only in Java 5.
Change your JDK to 1.5 or above in eclipse that will resolve this issue.
You can check your JDK by Project - > Java Build Path - > Libraries
If here you see it being Java 1.5 or above then check the compiler Compliance is set to 5 and above.
You can check that Project - > Java Compiler
EDIT:
To add new jdk to Eclipse
Right click on Project - > Java Build Path - > Libraries - > Add Libraries - > JRE System Library - > Installed Libraries - > Add - > Standard VM - > Provide your installation location and press OK
Note in the list of Installed JRE, ensure that you check your Java 7.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…