Module io.ebean.api
Package io.ebean

Class Lists

java.lang.Object
io.ebean.Lists

public final class Lists extends Object
Helper methods for Lists.
  • Method Details

    • partition

      public static <T> List<List<T>> partition(List<T> source, int max)
      Partition the source List into sub-lists with a maximum size.

      The sub-lists will all be the max size except for the last sub-list which can potentially be smaller.

      Type Parameters:
      T - The list element type
      Parameters:
      source - The source list
      max - The max size of each partition
      Returns:
      List of sub-list partitions