Java Array to List toList(T[] array)

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

Description

to List

License

Open Source License

Declaration

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

Method Source Code

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

import java.util.ArrayList;

import java.util.Collections;

import java.util.List;

public class Main {
    public static <T> List<T> toList(T[] array) {
        ArrayList<T> toRet = new ArrayList<T>();
        Collections.addAll(toRet, array);
        return toRet;
    }/*from w ww .  j  av  a2s.  c  o m*/
}

Related

  1. toList(T[] _array)
  2. toList(T[] anArrayToConvert)
  3. toList(T[] arr)
  4. toList(T[] array)
  5. toList(T[] array)
  6. toList(T[] array)
  7. toList(T[] array)
  8. toList(U... array)
  9. toList(V... elements)