Adding a generic switch/case for all objects with an overloaded == operator