Both callers of this function just assign the returned comparator to the comparator field of this object, so just push that behavior down to here.