- Generic Lists All sections.
- Generics Sections:
- User-defined Generic Class
- Omit the section Limitations of Generics
- Generic Comparable Interface
- Generic Comparator Interface
- Static Generic Functions
Generic Type Bound Expressions / Type Bound Examples
omit usage of "2. Upper bound using a wildcard"
- Java Sort Functions: both Arrays.sort and Collections.sort.
- Linked Lists Sections:
- Singly-linked Lists and related.
- Omit the sections about Doubly-linked Lists
Relevant Material from Textbook
- Chapter 18: Generics
- Chapter 19: 19.2, Chapter 20: Linked Lists
- Understand how to use the operations described in the notes: add, remove, get, set, indexOf, etc.
- Understand usage of List and Collection interfaces in declarations to specify intended usage.
- User-defined generic list class
- How to create and write implementations of simple functions
- What it means for a class to be comparable. How is it used.
- How to create a comparator and how to use it.
- How super and extends are used.
Be able to use these idiomatic type bound expressions:
<T extends Comparable<? super T>> Comparator<? super T>
- Examples of static functions like sort, max using generics with type bounds.
Be able to sketch diagrams and write methods for these lists, which have a header node and reference only the first data member. In particularly you should understand the code for these methods done in the first group of exercises:
addFirst, toString, getFirst, removeFirst, size, getLast, addLast, indexOf, contains.