public class

ListUtils

extends Object
java.lang.Object
   ↳ org.mule.modules.salesforce.ListUtils

Summary

Public Constructors
ListUtils()
Public Methods
final static <T> List<List<T>> split(List<T> original, int maxListSize, Class<? extends List> listImplementation)
Splits a list into smaller sublists.
final static <T> List<List<T>> split(List<T> original, int maxListSize)
Splits a list into smaller sublists.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public ListUtils ()

Public Methods

public static final List<List<T>> split (List<T> original, int maxListSize, Class<? extends List> listImplementation)

Splits a list into smaller sublists. The original list remains unmodified and changes on the sublists are not propagated to the original list.

Parameters
original The list to split
maxListSize The max amount of element a sublist can hold.
listImplementation The implementation of List to be used to create the returned sublists
Returns
  • A list of sublists
Throws
IllegalArgumentException if the argument maxListSize is zero or a negative number
NullPointerException if arguments original or listImplementation are null

public static final List<List<T>> split (List<T> original, int maxListSize)

Splits a list into smaller sublists. The sublists are of type ArrayList. The original list remains unmodified and changes on the sublists are not propagated to the original list.

Parameters
original The list to split
maxListSize The max amount of element a sublist can hold.
Returns
  • A list of sublists