Here you can find the source of convertArrayToList(int[] ids)
@SuppressWarnings({ "unchecked", "rawtypes" }) public static List convertArrayToList(int[] ids)
//package com.java2s; import java.util.ArrayList; import java.util.List; public class Main { @SuppressWarnings({ "unchecked", "rawtypes" }) public static List convertArrayToList(int[] ids) { int i;/*from w ww . jav a 2s. c o m*/ List result = null; if (ids != null) { result = new ArrayList(); for (i = 0; i < ids.length; ++i) result.add(new Integer(ids[i])); } return result; } @SuppressWarnings({ "unchecked", "rawtypes" }) public static List convertArrayToList(String[] ids) { int i; List result = null; if (ids != null) { result = new ArrayList(); for (i = 0; i < ids.length; ++i) result.add(new String(ids[i])); } return result; } }