Package org.fest.util
Class Lists
java.lang.Object
org.fest.util.Lists
Utility methods related to
java.util.List
s.- Author:
- Yvonne Wang, Alex Ruiz, Joel Costigliola
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> ArrayList<T>
newArrayList
(Iterable<? extends T> elements) Creates a mutableArrayList
containing the given elements.static <T> ArrayList<T>
newArrayList
(T... elements) Creates a mutableArrayList
containing the given elements.
-
Method Details
-
newArrayList
Creates a mutableArrayList
containing the given elements.- Type Parameters:
T
- the generic type of theArrayList
to create.- Parameters:
elements
- the elements to store in theArrayList
.- Returns:
- the created
ArrayList
, ofnull
if the given array of elements isnull
.
-
newArrayList
Creates a mutableArrayList
containing the given elements.- Type Parameters:
T
- the generic type of theArrayList
to create.- Parameters:
elements
- the elements to store in theArrayList
.- Returns:
- the created
ArrayList
, ofnull
if the givenIterable
isnull
.
-