public class ListUtils extends Object
Modifier and Type | Class and Description |
---|---|
static class |
ListUtils.BatchedList<T>
A holder for a sublist of a list, a flag indicating if there were more
elements after the included sublist, and the total number of items if
there had been no batching.
|
Modifier and Type | Method and Description |
---|---|
static <T> List<T> |
batchList(List<T> list,
BigInteger maxItems,
BigInteger skipCount,
int defaultMax)
Returns a batched version of the list, according to the passed
parameters.
|
static <T> ListUtils.BatchedList<T> |
getBatchedList(List<T> list,
BigInteger maxItems,
BigInteger skipCount,
int defaultMax)
Returns a batched version of the list, according to the passed
parameters.
|
public static <T> List<T> batchList(List<T> list, BigInteger maxItems, BigInteger skipCount, int defaultMax)
list
- the listmaxItems
- the maximum number of items, or null
for the
defaultskipCount
- the skip countdefaultMax
- the default maximum number of items if maxItems
is null
List.subList(int, int)
public static <T> ListUtils.BatchedList<T> getBatchedList(List<T> list, BigInteger maxItems, BigInteger skipCount, int defaultMax)
list
- the listmaxItems
- the maximum number of items, or null
for the
defaultskipCount
- the skip countdefaultMax
- the default maximum number of items if maxItems
is null
List.subList(int, int)
Copyright © 2014 Nuxeo SA. All Rights Reserved.