| Modifier and Type | Method and Description |
|---|---|
static <T> List<T> |
listOf(Collection<? extends T> collection)
Creates an
ArrayList from a Collection. |
static <T> List<T> |
listOf(T... elements)
Creates an
ArrayList containing all elements. |
static <T> List<T> |
unmodifiableListOf(Collection<? extends T> collection)
Creates an immutable
List from a Collection. |
static <T> List<T> |
unmodifiableListOf(T... elements)
Creates an immutable
List containing all elements. |
@SafeVarargs public static <T> List<T> listOf(T... elements)
ArrayList containing all elements.T - element typeelements - elements to add to listpublic static <T> List<T> listOf(Collection<? extends T> collection)
ArrayList from a Collection.T - element typecollection - elements@SafeVarargs public static <T> List<T> unmodifiableListOf(T... elements)
List containing all elements.T - element typeelements - elements to add to listpublic static <T> List<T> unmodifiableListOf(Collection<? extends T> collection)
List from a Collection.T - element typecollection - elementsCopyright © 2019. All rights reserved.