org.fest.util
Class Lists

java.lang.Object
  extended by org.fest.util.Lists

public final class Lists
extends Object

Utility methods related to java.util.Lists.

Author:
Yvonne Wang, Alex Ruiz, Joel Costigliola

Method Summary
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

newArrayList

public static <T> ArrayList<T> newArrayList(T... elements)
Creates a mutable ArrayList containing the given elements.

Type Parameters:
T - the generic type of the ArrayList to create.
Parameters:
elements - the elements to store in the ArrayList.
Returns:
the created ArrayList, of null if the given array of elements is null.

newArrayList

public static <T> ArrayList<T> newArrayList(Iterable<? extends T> elements)
Creates a mutable ArrayList containing the given elements.

Type Parameters:
T - the generic type of the ArrayList to create.
Parameters:
elements - the elements to store in the ArrayList.
Returns:
the created ArrayList, of null if the given Iterable is null.


Copyright © 2007-2012 FEST (Fixtures for Easy Software Testing). All Rights Reserved.