Here you can find the source of asBooleanArray(List
public static boolean[] asBooleanArray(List<Boolean> list)
//package com.java2s; // it under the terms of the GNU Lesser General Public License as published by import java.util.List; public class Main { public static boolean[] asBooleanArray(List<Boolean> list) { int n = list.size(); boolean[] array = new boolean[n]; for (int i = 0; i < n; i++) { array[i] = list.get(i);// w w w. j av a 2s .c om } return array; } }