public final class UnmodifiableList
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static <E> java.util.List<E> |
copyOf(E[] elements)
Returns an unmodifiable view of the list composed of elements.
|
static <E> java.util.List<E> |
copyOf(java.lang.Iterable<? extends E> elements)
Returns an unmodifiable view of the list composed of elements.
|
static <E> java.util.List<E> |
of(E... elements)
Returns an unmodifiable view of the list composed of elements.
|
@SafeVarargs public static <E> java.util.List<E> of(E... elements)
E - Type of the elements of the list.elements - Array of elements.public static <E> java.util.List<E> copyOf(E[] elements)
E - Type of the elements of the list.elements - Array of elements.public static <E> java.util.List<E> copyOf(java.lang.Iterable<? extends E> elements)
E - Type of the elements of the list.elements - Iterable of elements.