/**
* 从一个邮件集合中取出另一个邮件集合
*
* @param index
* 下标位置
* @param size
* 大小
* @param list
* 另一个集合
* @return
*/
private ArrayList<Mail> getListFromAnotherList(int index, int size, ArrayList<Mail> list)
{
if (index < 0 || size < 1 || list.size() < 1 || list.size() < index + 1)
{
return null;
}
int temp = index + size;
int loopTimes = 0;
if (temp > list.size())
{
loopTimes = list.size();
} else
{
loopTimes = temp;
}
ArrayList<Mail> copyList = new ArrayList<Mail>();
for (int i = index; i < loopTimes; i++)
{
copyList.add(list.get(i));
}
return copyList;
}
转载于:https://my.oschina.net/u/878084/blog/155665