Adding back in generics

Last time I did this people using java 6 had problems. JOSM now requires java 7.