二维数组按照某列排序

private static void sort(int[][] ob, final int[] order) {
    Arrays.sort(ob, (Comparator<Object>) (o1, o2) -> {
        int[] one = (int[]) o1;
        int[] two = (int[]) o2;
        for (int k : order) {
            if (one[k] > two[k]) {
                return 1;
            } else if (one[k] < two[k]) {
                return -1;
            }
        }
        return 0;
    });
}
上一篇:健康类App原型制作分享-Mindmate


下一篇:1.2:页面静态化真静态