Generic Types and Methods
- slide 4 : 21
The class ObjectSet
A set of
Object
s fulfills all needs, but ...
The class ObjectSet.
A client of ObjectSet - working with sets of Die objects.
Output from the ObjectSet client program.
A client of ObjectSet - working with set of different types.
Output from the the client of ObjectSet - the version that works with sets of different types.
Class
ObjectSet
is not type safe
Use of class
Object
as element type requires a lot of casting