Package org.fest.util
Class Lists
- java.lang.Object
-
- org.fest.util.Lists
-
public final class Lists extends java.lang.Object
Utility methods related tojava.util.List
s.- Author:
- Yvonne Wang, Alex Ruiz, Joel Costigliola
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> java.util.ArrayList<T>
newArrayList(java.lang.Iterable<? extends T> elements)
Creates a mutableArrayList
containing the given elements.static <T> java.util.ArrayList<T>
newArrayList(T... elements)
Creates a mutableArrayList
containing the given elements.
-
-
-
Method Detail
-
newArrayList
public static <T> java.util.ArrayList<T> newArrayList(T... elements)
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
public static <T> java.util.ArrayList<T> newArrayList(java.lang.Iterable<? extends T> elements)
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
.
-
-