Package nva.commons.core
Class CollectionUtils
java.lang.Object
nva.commons.core.CollectionUtils
-
Method Summary
-
Method Details
-
partition
Splits a list into consecutive sublists, each of the given size (the last may be smaller). The returned sublists are views of the original list, so changes to the original list will be reflected in the partitions.- Parameters:
items- the list to partitionpartitionSize- the maximum size of each partition (must be positive)- Returns:
- an unmodifiable list of consecutive sublists
-