8.1. Containers: Building a Better Mousetrap8.1.1. Can Containers Be Fixed?8.2. Enter Generics8.2.1. Talking About Types8.3. “There Is No Spoon”8.3.1. Erasure8.3.2. Raw Types8.4. Parameterized Type Relationships8.4.1. Why Isn’t a List<Date> a List<Object>?8.5. Casts8.6. Writing Generic Classes8.6.1. The Type Variable8.6.2. Subclassing Generics8.6.3. Exceptions and Generics8.6.3.1. No generic Throwables8.6.4. Parameter Type Limitations8.6.4.1. Using Class<T>8.7. Bounds8.7.1. Erasure and Bounds (Working with Legacy Code)8.8. Wildcards8.8.1. A Supertype of All Instantiations8.8.2. Bounded Wildcards8.8.3. Thinking Outside the Container8.8.4. Lower Bounds8.8.5. Reading, Writing, and Arithmetic8.8.6. <?>, <Object>, and the Raw Type8.8.7. Wildcard Type Relationships8.9. Generic Methods8.9.1. Generic Methods Introduced8.9.2. Type Inference from Arguments8.9.3. Type Inference from Assignment Context8.9.4. Explicit Type Invocation8.9.5. Wildcard Capture8.9.6. Wildcard Types Versus Generic Methods8.10. Arrays of Parameterized Types8.10.1. Using Array Types8.10.2. What Good Are Arrays of Generic Types?8.10.3. Wildcards in Array Types8.11. Case Study: The Enum Class8.12. Case Study: The sort() Method8.13. Conclusion