Generic Types and Methods
- slide 7 : 21
The generic class Set<T>
It is attractive to parameterize the class
Set
with its element type
T
The class
Set<T>
.
A client of
Set<T>
- working with sets of different types.
Output from the
Set<T>
client program.
Intersection, union, and difference: Operations on sets
An element access operation on sets
A generic Pair class
An actual type is provided when the class
Set
is used, for instance in a client class.