List<Device> deviceList1 = deviceGateway.getDeviceList(device);
List<List<Device>> partition1 = Lists.partition(deviceList1, 50);
for (List<Device> deviceList: partition1) {
System.out.println("deviceList-每次五十条数据的循环处理:"+deviceList);
}
java--Lists.partition用法:Lists.partition(数据集合, 每次取的固定条数)
于 2023-09-05 17:03:50 首次发布