我在GWT中有一个List,我希望对它进行排序,但GWT在运行时抱怨它无法完成。
List<int[]> tuples = new LinkedList<int[]>();
tuples.sort(new TupleComparator());
class TupleComparator implements Comparator<int[]> {
@Override
public int compare(int[] o1, int[] o2) {
int i = 0;
int l = o1.length;
while (i < l && o1[i] == o2[i]) {
i++;
}
return (i == l ? 0 : o1[i] - o2[i]);
}
}
[ERROR] [testgwtlistofint] - Line 116: The method sort(TupleComparator)
is undefined for the type List<int[]>