Package org.apache.commons.compress.utils

# Class Lists

java.lang.Object
org.apache.commons.compress.utils.Lists

public class Lists extends Object
List utilities

Since:
  1.13

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static <E> ArrayList<E>`
  `newArrayList()`
  Creates a new `ArrayList`.
  `static <E> ArrayList<E>`
  `newArrayList(Iterator<? extends E> iterator)`
  Creates a new `ArrayList` filled with the contents of the given `iterator`.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Method Details

  - ### newArrayList

    public static <E> ArrayList<E> newArrayList()
    Creates a new `ArrayList`.
    Type Parameters:
      `E` - type of elements contained in new list
    Returns:
      a new `ArrayList`

  - ### newArrayList

    public static <E> ArrayList<E> newArrayList(Iterator<? extends E> iterator)
    Creates a new `ArrayList` filled with the contents of the given `iterator`.
    Type Parameters:
      `E` - type of elements contained in new list
    Parameters:
      `iterator` - the source iterator
    Returns:
      a new `ArrayList`