Here you can find the source of toList(T[] _array)
Parameter | Description |
---|---|
T | a parameter |
_array | a parameter |
public static <T extends List<T>> List<T> toList(T[] _array)
//package com.java2s; //License from project: Open Source License import java.util.ArrayList; import java.util.List; public class Main { /**//from w w w . j ava2 s. co m * Generische Methode zum Umwandeln von Array in Listen * * @param <T> * @param _array * @return */ public static <T extends List<T>> List<T> toList(T[] _array) { List<T> r = new ArrayList<T>(); for (int i = 0, m = _array.length; i < m; i++) { r.add(_array[i]); } return r; } }