To sort by position, for example, you can use
java.util.Collections.sort(tasks, new Comparator<Task>() {
@Override
public int compare(Task t1, Task t2) {
return t1.getPosition() - t2.getPosition();
});
Yuval =8-)
Yuval
2009-05-24 08:59:09