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.*;

public class Main {
    public static <T> List<T> toList(T[] array) {
        List<T> result = new ArrayList<>(array.length);
        for (T o : array) {
            result.add(o);//from  w w  w  .ja  v  a 2s.c  o  m
        }
        return result;
    }
}

Related

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