public class CollectionUtil extends Object
| Constructor and Description |
|---|
CollectionUtil() |
| Modifier and Type | Method and Description |
|---|---|
static <T> void |
fillList(List<T> list,
int size,
T object)
Fills a
List with with the specified object
until it has the specified size. |
static void |
fillList(List list,
int size)
|
static <T> List<T> |
truncateList(List<T> list,
int len)
Returns a truncated version of the specified
List. |
public static void fillList(List list, int size)
list - the List that should be filledsize - the resulting size of the Listpublic static <T> void fillList(List<T> list, int size, T object)
List with with the specified object
until it has the specified size. If the specified size is
equal or lower the List size, nothing happens.list - the List that should be filledsize - the resulting size of the Listobject - the object to fill the list withCopyright © 2003-2016. All Rights Reserved.