Here you can find the source of toBooleanArray(final Object[] array)
public static boolean[] toBooleanArray(final Object[] array)
//package com.java2s; //License from project: Open Source License public class Main { public static boolean[] toBooleanArray(final Object[] array) { if (array == null) { return new boolean[0]; }//from www . j a v a 2 s . co m final boolean[] retVal = new boolean[array.length]; try { for (int i = 0; i < array.length; i++) { retVal[i] = Boolean.parseBoolean(String.valueOf(array[i])); } return retVal; } catch (Exception e) { return new boolean[0]; } } }