Package com.logicaldoc.util
Class CollectionUtil
- java.lang.Object
-
- com.logicaldoc.util.CollectionUtil
-
public class CollectionUtil extends Object
Some utility methods to handle collections.- Since:
- 8.2.1
- Author:
- Marco Meschieri - LogicalDOC
-
-
Constructor Summary
Constructors Constructor Description CollectionUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
main(String[] args)
static <T> Collection<List<T>>
partition(List<T> list, int size)
Divide a list to segments of n size
-
-
-
Method Detail
-
main
public static void main(String[] args)
-
partition
public static <T> Collection<List<T>> partition(List<T> list, int size)
Divide a list to segments of n size- Type Parameters:
T
- the type of elements inlist
- Parameters:
list
- the collection to processsize
- number of elements in each segment- Returns:
- the collection of segments
-
-