Class Lists
- java.lang.Object
-
- org.apache.commons.compress.utils.Lists
-
public class Lists extends java.lang.Object
List utilities- Since:
- 1.13
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <E> java.util.ArrayList<E>
newArrayList()
Creates a newArrayList
.static <E> java.util.ArrayList<E>
newArrayList(java.util.Iterator<? extends E> iterator)
Creates a newArrayList
filled with the contents of the giveniterator
.
-
-
-
Method Detail
-
newArrayList
public static <E> java.util.ArrayList<E> newArrayList()
Creates a newArrayList
.- Type Parameters:
E
- type of elements contained in new list- Returns:
- a new
ArrayList
-
newArrayList
public static <E> java.util.ArrayList<E> newArrayList(java.util.Iterator<? extends E> iterator)
Creates a newArrayList
filled with the contents of the giveniterator
.- Type Parameters:
E
- type of elements contained in new list- Parameters:
iterator
- the source iterator- Returns:
- a new
ArrayList
-
-