Class Partition<T>

java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<List<T>>
com.cognite.client.util.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.