A switch would probably be clearer here, and easier to extend when a different SortingType is added.