title: How to get attributes for HashMap value?
body: <p>"my" code:</p>
  
  <pre><code>public void iterateHashmap2() {
      HashMap hashmap = this.media;
      Iterator it = hashmap.keySet().iterator();
      while (it.hasNext())
      {
          Object key = it.next();
          Object val = hashmap.get(key);
              // doesn't work..
          System.out.println(val.getAttribute);
      }
  }
  </code></pre>
  
  <p>So my question is, how do I get the attributes that the value contains. The value is a class I made myself, which contains 4 Strings and another class I made, as attributes.
  (What I want to do is iterate through a hashmap and compare the String of an attribute that is stored in the value with input data.. so I need to be able to access the attributes in the values of the hashmap..hope that makes sense..)</p>