Java List Create asList(T... elements)

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

Description

as List

License

Apache License

Declaration

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

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.util.*;

public class Main {
    public static <T> List<T> asList(T... elements) {
        List<T> toReturn = new ArrayList<>();
        toReturn.addAll(Arrays.asList(elements));
        return toReturn;
    }/*from www  . ja  v a2  s .  co  m*/
}

Related

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