@@ -0,0 +1,1311 @@
+package me.wayne.sort.split;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.List;%0Aimport java.util.Random;%0A%0Apublic class TestSplit %7B%0A%0A    private static final int PAGE_SIZE = 4 * 2;%0A%0A    public static void main(String%5B%5D args) %7B%0A        int i = 100;%0A        List%3CList%3CInteger%3E%3E list = new ArrayList%3C%3E();%0A        for (int index = 0; index %3C i; index++) %7B%0A            list.add(new ArrayList%3C%3E());%0A        %7D%0A        for (int index = 0; index %3C i; index++) %7B%0A            Random random = new Random();%0A            int r = random.nextInt(100);%0A            for (int n = 0; n %3C r; n++) %7B%0A                list.get(index).add(n);%0A            %7D%0A        %7D%0A%0A        for (List%3CInteger%3E source : list) %7B%0A            List%3CList%3CInteger%3E%3E result = splitList(source, PAGE_SIZE);%0A            System.out.println(%22result : %22 + result);%0A        %7D%0A    %7D%0A%0A%0A    private static %3CT%3E List%3CList%3CT%3E%3E splitList(List%3CT%3E list, int pageSize) %7B%0A        List%3CList%3CT%3E%3E listArray = new ArrayList%3C%3E();%0A        List%3CT%3E subList = null;%0A        for (int i = 0; i %3C list.size(); i++) %7B%0A            if (i %25 pageSize == 0) %7B%0A                subList = new ArrayList%3C%3E();%0A                listArray.add(subList);%0A            %7D%0A            if (subList != null) %7B%0A                subList.add(list.get(i));%0A            %7D%0A        %7D%0A        return listArray;%0A    %7D%0A%7D%0A

添加测试分段的代码。