Depending on what you want to do with the objects in the list, you can either inherit all your gravity objects from a common gravityObject class and cast to this when accessing members of the list. Or you create a common gravity object interface which exposes the gravity methods for all objects in the list. You can cast to an interface type just like you cast to any parent object type.