Use the type parameter of Comparator...
Note: I want to stab my past self.