Looking at this:
private Collection<Element> elements = new ArrayList<Element>();
What does that do?
Printable View
Looking at this:
private Collection<Element> elements = new ArrayList<Element>();
What does that do?
This is how Java implements generics, a new feature in Java 5, I think, and it allows for increased compile-time type safety. For details, please have a look here:
Lesson: Generics (The Java™ Tutorials > Bonus)