Generics in Java

lecture
java
generics
wildcards
type-erasure

See csse2002 for course logistics.

Today’s outline

  1. Generics
  2. Bounded Generics
  3. Bounds through Wildcards
  4. Type Erasure
  5. Practical Example

All content is in java-generics.

Applied class

See week9-tutorial-substitution-principle-and-pre-post-conditions — more practice with the Liskov Substitution Principle (from java-solid-principles, Week 7) and pre/postconditions (from java-specification, Week 3).

Practical

See week9-lab-refactoring — refactoring in the small and in the large, extending java-refactoring (Week 6).