Package org.fest.util

Class Lists


  • public final class Lists
    extends java.lang.Object
    Utility methods related to java.util.Lists.
    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 mutable ArrayList containing the given elements.
      static <T> java.util.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> java.util.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> java.util.ArrayList<T> newArrayList​(java.lang.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.