Bootstrap

List集合分页操作

代码实现

在实际业务代码中有时在刷数据时需要对集合List进行分批操作,故此总结记录一下:

for (int i = 0; i < batchList.size(); i += SmsCommonConstants.EduPushVariable.BATCH_NUM) {
   
int end = i + SmsCommonConstants.EduPushVariable.BATCH_NUM;
      if(end > batchList.size()) {
   
          end = batchList.size();
      }
      List
;