Simple storage and retrieval of objects of multiple types in one class