Here you can find the source of toObjectArray(boolean[] primitiveArray)
public static Boolean[] toObjectArray(boolean[] primitiveArray)
//package com.java2s; public class Main { public static Boolean[] toObjectArray(boolean[] primitiveArray) { final Boolean[] objects = new Boolean[primitiveArray.length]; int index = 0; for (boolean b : primitiveArray) objects[index++] = Boolean.valueOf(b); return objects; }//www . j av a 2s.c o m public static Integer[] toObjectArray(int[] primitiveArray) { final Integer[] objects = new Integer[primitiveArray.length]; int index = 0; for (int v : primitiveArray) objects[index++] = Integer.valueOf(v); return objects; } public static Double[] toObjectArray(double[] primitiveArray) { final Double[] objects = new Double[primitiveArray.length]; int index = 0; for (double b : primitiveArray) objects[index++] = Double.valueOf(b); return objects; } }