A replacement for switch statements using a dictionary object and generics.