public final class Lists extends Object
java.util.Lists.| Modifier and Type | Method | Description |
|---|---|---|
static <T> List<T> |
emptyList() |
|
static <T> ArrayList<T> |
newArrayList() |
Creates a mutable
ArrayList. |
static <T> ArrayList<T> |
newArrayList(Iterable<? extends T> elements) |
Creates a mutable
ArrayList containing the given elements. |
static <T> ArrayList<T> |
newArrayList(Iterator<? 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. |
@SafeVarargs public static <T> ArrayList<T> newArrayList(T... elements)
ArrayList containing the given elements.T - the generic type of the ArrayList to create.elements - the elements to store in the ArrayList.ArrayList, of null if the given array of elements is null.public static <T> ArrayList<T> newArrayList(Iterable<? extends T> elements)
ArrayList containing the given elements.T - the generic type of the ArrayList to create.elements - the elements to store in the ArrayList.ArrayList, or null if the given Iterable is null.public static <T> ArrayList<T> newArrayList(Iterator<? extends T> elements)
ArrayList containing the given elements.T - the generic type of the ArrayList to create.elements - the elements to store in the ArrayList.ArrayList, or null if the given Iterator is null.public static <T> ArrayList<T> newArrayList()
ArrayList.T - the generic type of the ArrayList to create.ArrayList, of null if the given array of elements is null.public static <T> List<T> emptyList()
List.Copyright © 2014–2019. All rights reserved.