Java Generics are enforced at compile time, but the type of the Collection is erased, and what you're left with is a duplicate method. In an IDE, you would get some message about "same type erasure."
Here's a good discussion about it that I enjoyed: