Returns an unmodifiable list containing the specified first element and backed by the specified array of additional elements. Changes to the rest array will be reflected in the returned list. Unlike Arrays#asList, the returned list is unmodifiable. This is useful when a varargs m
(@Nullable E first, E[] rest)
| 310 | * @return an unmodifiable list containing the specified elements |
| 311 | */ |
| 312 | public static <E> List<E> asList(@Nullable E first, E[] rest) { |
| 313 | return new OnePlusArrayList<E>(first, rest); |
| 314 | } |
| 315 | |
| 316 | /** @see Lists#asList(Object, Object[]) */ |
| 317 | private static class OnePlusArrayList<E> extends AbstractList<E> |
no outgoing calls
no test coverage detected