Here you can find the source of toIntegerCollection(int[] ints)
public static Collection<Integer> toIntegerCollection(int[] ints)
//package com.java2s; // it under the terms of the GNU General Public License as published by import java.util.ArrayList; import java.util.Collection; public class Main { public static Collection<Integer> toIntegerCollection(int[] ints) { ArrayList<Integer> ret = new ArrayList<Integer>(); for (int i : ints) ret.add(new Integer(i)); return ret; }//from w w w . j av a 2 s .com }