数组分割问题,求大神提示

如下面一个类,类中有一个属性是list,现在要对list分割,比如 每10条 为一个list。
例如,list长度为25.然后分割后的结果为三个 Base,Base中list分别为10,10 ,5

 public class Base {

    private List<Object> list;
}

我是想写一个公共的工具,然后在项目中使用,想了半天没想到什么通用的方法,好头疼,求大神提示

这是我写的一个分割链表的工具,但是现在这个链表是放在一个类中的,改怎么实现呢?

```private void cutAndSend (String queueName, List list) {
List temp = new ArrayList();
for (int i = 0; i < list.size();) {
if (i + LEN < list.size()) {
int j = i + LEN;
while (i < j) {
temp.add(list.get(i++));
}
i = j;
//temp 就是分割好的,可以调用其他方法使用
temp.clear();
} else {
while (i < list.size()) {
temp.add(list.get(i++));
}
//temp 就是分割好的,可以调用其他方法使用
temp.clear();
}
}
}





虽然没有看懂你写的,但是对list进行指定长度的分割可以这样实现:
public List cutList(int length,List list){

   List<Base> baseList = new ArrayList<Base>();

   int i = list.size() / length;

   for(int x =0; x<i;x++){
       Base base = new Base();
       list.subList(x*length, x*length+length-1);
       baseList.add(base);
   }
   if(list.size() % length !=0){
       Base base = new Base();
       list.subList((i-1)*length, (i-1)*length+(list.size() % length)); 
       baseList.add(base);
   }
   return baseList;
}
    可能实现的方法比较复杂,但是我想到的只有这种方法了。。。

感谢楼上两位的提示,可能我没有把问题描述清楚,不过问题已经解决了,拿出来分享下:

 /**
     * 把list每LEN条数据,发送AMQ
     * 
     * @param <T>
     * @param queueName
     * @param list
     */
    private <T> void send(String queueName, List<T> list) {
        List<T> temp = new ArrayList<T>();
        SendData<T> sendData = new SendData<T>();
        for (int i = 0; i < list.size();) {
            if (i + LEN < list.size()) {
                int j = i + LEN;
                while (i < j) {
                    temp.add(list.get(i++));
                }
                i = j;
                sendData.setList(temp);
                sendAMQ(queueName, sendData);
                temp.clear();
            } else {
                while (i < list.size()) {
                    temp.add(list.get(i++));
                }
                sendData.setList(temp);
                sendAMQ(queueName, sendData);
                temp.clear();
            }
        }
    }

其中 SendData 是:

 public class SendData<T> implements Serializable {

    /**
     * 
     */
    private static final long serialVersionUID = -8167506370744303318L;

    private List<T> list;

    public List<T> getList() {
        return list;
    }

    public void setList(List<T> list) {
        this.list = list;
    }


}

这样 send(String queueName, List list) 能接受任何类型的list,并且会把list 按照指定的长度LEN 分组,每一组list 都会塞进 SendData 中。就是我描述的问题:
对list分割,比如 每10条 为一个list,假如list长度为25.然后分割后的结果为三个 Base,Base中list分别为10,10 ,5

之所以要这样,是为了 能批量发送AMQ,然后接收端能够进行反序列化得到数据