Here you can find the source of toList(Object[] array)
Parameter | Description |
---|---|
array | a parameter |
public static ArrayList toList(Object[] array)
//package com.java2s; import java.util.ArrayList; public class Main { /**// www .j a v a2 s. c o m * Converts the supplied object list into an ArrayList * * @param array * @return array list or null */ public static ArrayList toList(Object[] array) { if (array == null) { return null; } final int len = array.length; ArrayList rs = new ArrayList(len); for (int i = 0; i < len; i++) { rs.add(array[i]); } return rs; } }