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
  • Method Details

    • 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 in list
      Parameters:
      list - the collection to process
      size - number of elements in each segment
      Returns:
      the collection of segments