Knowing what types we are working with is valuable. WeakSet has some restriction on membership, but as you may know, objects can vary quite a lot.
In this recipe, we'll take a look at how to create a wrapper class for Map in order to control what types are used in the Map.