Lots of New Language Features in Java 5…
The new features work together…
Common operations are now typesafe
Customise Collection Classes (continued)
Reveal implicit type requirements of interfaces
Add control over argument validation
Add control over argument validation (continued)
But Java has always been able to do that!
So generic classes can’t be covariant
How will we do without covariance?
How will we do without covariance? (continued)
Using a wildcard type restricts access
Using a wildcard type restricts access (continued)
Bounded wildcards can work together
Bounds work with type variables too
Erasure produces some surprises