In practice you rarely need a mixed-type collection, and if you do,
you should have a good look at the design of your application. To me, the need for a mixed-type collection sounds like a
code smell. If you use such a collection, then somewhere in your code you're going to use ugly things like casts or the
instanceof operator.