Look at the Collections class. It has a lot of utilities for collection objects.