public final class Lists extends Object
java.util.List
s.Modifier and Type | Method and Description |
---|---|
static <T> ArrayList<T> |
newArrayList(Iterable<? extends T> elements)
Creates a mutable
ArrayList containing the given elements. |
static <T> ArrayList<T> |
newArrayList(T... elements)
Creates a mutable
ArrayList containing the given elements. |
public static <T> ArrayList<T> newArrayList(T... elements)
ArrayList
containing the given elements.T
- the generic type of the ArrayList
to create.elements
- the elements to store in the ArrayList
.ArrayList
, of null
if the given array of elements is null
.public static <T> ArrayList<T> newArrayList(Iterable<? extends T> elements)
ArrayList
containing the given elements.T
- the generic type of the ArrayList
to create.elements
- the elements to store in the ArrayList
.ArrayList
, of null
if the given Iterable
is null
.Copyright © 2013 AssertJ. All Rights Reserved.