title: Coverting a Boolean object array to boolean primitive array?
body: <p>I have an ArrayList of type Boolean that requires to be manipulated as a boolean[] as I am trying to use:</p>
  
  <pre><code>AlertDialog builder;
  builder.setMultiChoiceItems(items, checkedItems, new DialogInterface.OnMultiChoiceClickListener() { ... });
  </code></pre>
  
  <p>However, while I can create a Boolean object array, I cannot find an efficient way to covert this object array to a primitive array that the builder function calls for (the only method I can come up with is to iterate over the Object array and build a new primitive array).</p>
  
  <p>I am retrieving my Object array from the ArrayList as follows:</p>
  
  <pre><code>final Boolean[] checkedItems = getBoolList().toArray(new Boolean[getBoolList().size()]);
  </code></pre>
  
  <p>Is there something I can do with my ArrayList? Or is there an obvious casting/conversion method that I am missing??</p>
  
  <p>Any help appreciated!</p>