Here you can find the source of asList(T... a)
Parameter | Description |
---|---|
a | a parameter |
public static <T> List<T> asList(T... a)
//package com.java2s; //License from project: Open Source License import java.util.Arrays; import java.util.List; public class Main { /**/*from w w w.ja v a 2 s. c o m*/ * * @param a * @return null when a is null, otherwise Arrays.asList(a) */ public static <T> List<T> asList(T... a) { List<T> rtn = null; if (a != null) { rtn = Arrays.asList(a); } return rtn; } }