title: Object cannot be converted to Entry<String,Integer>
body: <p>This error appears when i try to loop my hashmap, and i have no idea why.</p>
  
  <p><strong>Object cannot be converted to Entry</strong></p>
  
  <p>Into package1:</p>
  
  <pre><code>protected static final Map&lt;String, Integer&gt; distanceLabels = new HashMap&lt;&gt;();
  </code></pre>
  
  <p>Into the package im having the error:</p>
  
  <pre><code>Map distanceLabels = package1.distanceLabels;
  for (Map.Entry&lt;String, Integer&gt; entry : distanceLabels.entrySet()) {
      String key = entry.getKey();
      Object value = entry.getValue();
      // ...
  }
  </code></pre>