Java Utililty Methods List Partition

List of utility methods to do List Partition

Description

The list of methods to do List Partition are organized into topic(s).

Method

List>splitListByPartitionSize(List list, int partitionSize)
to split a list into lists with equally sized
List<List<?>> partitionList = new ArrayList<>();
for (int i = 0; i < list.size(); i += partitionSize) {
    List subList = new ArrayList(list.subList(i, Math.min(i + partitionSize, list.size())));
    partitionList.add(subList);
return partitionList;