title: How can you test for a boolean value inside a Map?
body: <p>I am new to java so please go easy on me. I have a hashmap which contains String keys and Boolean values like the following.</p>
  
  <pre><code>Map&lt;String, Boolean&gt; states = new HashMap&lt;String, Boolean&gt;();
  states.put("b_StorageAvailable", true);
  states.put("b_StorageWritable", true);
  </code></pre>
  
  <p>Which I am returning from a function. Once I get this somewhere else, I would like to be able to call an if statement on one of these to see if its true or false.</p>
  
  <pre><code>if(states.get("b_StorageAvailable")) { 
      //Do this 
  }
  </code></pre>
  
  <p>But java keeps showing me that I need this to be a Boolean type, and it is a Map type. How can I do this easily?</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>It should be noted that the code I am calling the function with and getting the return value looks like this,</p>
  
  <pre><code>Map states = this.getExternalStorageStatus();
  </code></pre>