Class Partition<T>

  • Type Parameters:
    T -
    All Implemented Interfaces:
    Iterable<List<T>>, Collection<List<T>>, List<List<T>>

    public final class Partition<T>
    extends AbstractList<List<T>>
    Utility class that splits a (large) List into a set of smaller batches (also represented as List). This class offers a performant way of splitting collections into smaller batches. Depending on input size it may be 10 times more efficient than a for loop.