Compare two P properties returned by the mapper.
P
@override int compare(P a, P b) => comparator(a, b);