Java List from Array arrayAsListCopy(T... array)

Here you can find the source of arrayAsListCopy(T... array)

Description

array As List Copy

License

Open Source License

Declaration

public static <T> List<T> arrayAsListCopy(T... array) 

Method Source Code

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

import java.util.ArrayList;
import java.util.Arrays;

import java.util.List;

public class Main {
    public static <T> List<T> arrayAsListCopy(T... array) {
        List<T> list = new ArrayList<>();
        list.addAll(Arrays.asList(array));
        return list;
    }/* ww  w .j  av a 2 s  .c o  m*/
}

Related

  1. array2list(String[] array)
  2. array2List(T... array)
  3. arrayAsArrayList(E... elements)
  4. arrayAsList(Object value)
  5. arrayAsList(Object[] array)
  6. arrayAsListEmptyIfNull(T[] array)
  7. arrayContainsValue(final String[] list, final String value)
  8. arrayMaxInt(final List array)
  9. arrayOf(List objs)