Java List to Array asBooleanArray(List list)

Here you can find the source of asBooleanArray(List list)

Description

as Boolean Array

License

Open Source License

Declaration

public static boolean[] asBooleanArray(List<Boolean> list) 

Method Source Code


//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;
    }
}

Related

  1. asArray(List indices)
  2. asArray(List list)
  3. asArray(List list)
  4. asArrayList(E first, E... other)
  5. asArrayList(T... a)
  6. asByteArray(final List l)
  7. asClassArray(List> list)
  8. convertStringListToArray(List list)
  9. convertStringListToArray(List list)