Java List Create asList(T[] array)

Here you can find the source of asList(T[] array)

Description

as List

License

Open Source License

Declaration

public static <T> List<T> asList(T[] array) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.util.*;

public class Main {
    public static <T> List<T> asList(T[] array) {
        List<T> list = new ArrayList<>();
        for (T value : array) {
            list.add(value);/*from  www.  j  a va 2s. com*/
        }

        return list;
    }

    public static List<Byte> asList(byte[] array) {
        List<Byte> list = new ArrayList<>();
        for (byte value : array) {
            list.add(value);
        }

        return list;
    }
}

Related

  1. asList(T... a)
  2. asList(T... array)
  3. asList(T... elements)
  4. asList(T... items)
  5. asList(T... objs)
  6. asListBox(double[] a)
  7. asListNoNulls(T... array)
  8. create2DHorizontalIndexList( final int n)
  9. createActMask(ArrayList stateActions, ArrayList beliefActions)