@SuppressWarnings("unchecked")
public static Comparator<Message<?>> create(List<Sort> sorts) {
List<Comparator<?>> comps = new ArrayList<Comparator<?>>();
for (int i = 0; i < sorts.size(); i++) {
Sort sort = sorts.get(i);
boolean reverse = sort.isReverse();
Comparator<Message<?>> comparator = null;
switch (sort.getSortClause()) {
case Arrival:
comparator = InternalDateComparator.internalDate(reverse);
break;
case MailboxCc:
comparator = HeaderMailboxComparator.cc(reverse);