Java List Create asList(T... a)

Here you can find the source of asList(T... a)

Description

as List

License

Open Source License

Declaration

public static <T> List<T> asList(T... a) 

Method Source Code


//package com.java2s;

import java.util.*;

public class Main {
    public static <T> List<T> asList(T... a) {
        if (a == null || a.length == 0) {
            return new ArrayList<T>();
        }/*from   ww  w. j  av  a2s .c  o m*/
        return Arrays.asList(a);
    }
}

Related

  1. asList(int[] a)
  2. asList(int[] array)
  3. asList(Iterable iteratable)
  4. asList(Object[] array)
  5. asList(Object[] array)
  6. asList(T... array)
  7. asList(T... elements)
  8. asList(T... items)
  9. asList(T... objs)