// keep it as is
} else if (orderBy.get("$natural").equals(Integer.valueOf(-1))) {
Collections.reverse(objs);
}
} else {
Collections.sort(objs, new DocumentComparator(orderBy));
}
}
if (numberToReturn > 0 && objs.size() > numberToReturn)
objs = objs.subList(0, numberToReturn);