Implement and use compareTo on Generator