title: Measuring overlap between arrays
body: <p>Given several arrays in Java (i'll be looping through keys currently stored in a HashMap), I want to be able to identify (based on the <code>boolean[]</code> keys currently stored) which indices are <code>true</code> in all of them, and which are <code>false</code>. </p>
  
  <p>Example:</p>
  
  <pre><code>{true, true,false}
  {true,false,false}
  {true,false, false}
  </code></pre>
  
  <p>would yield index 0 as having all true values, and index 2 as having all false values. </p>
  
  <p>One idea I have is to convert the boolean array to an array of ints, summing the values, and if the summed array index = numArrays, then it is True in all of them. Similarly, if the summed array index is 0, it is false in all of them. </p>
  
  <p>Am not sure how to go about doing this in an efficient way (in java), letalone if this is a good method to achieve my desired result. </p>
  
  <p>Is there a way to convert the array of booleans to ints? If not, is the easiest alternative to instantiate a new array of ints, and loop through the boolean array to populate the new array? </p>