title: Java 8 | type Map.Entry does not define getValue(LinkedHashMap<String,House>)
body: <p>I have a class named <code>Street</code> and it has property of type <code>House</code> and it has property of type <code>Room</code>.</p>
  
  <pre><code>class Street{
     private House house;
     // getters &amp; setters
  }
  </code></pre>
  
  <p><code>House</code> class has a property <code>Room</code>:</p>
  
  <pre><code>class House {
     private Room room;
     // getters &amp; setters
  }
  </code></pre>
  
  <p><code>Room</code> class has a property roomCapacity:</p>
  
  <pre><code>class Room {
     private double roomCapacity;
     // getters &amp; setters
  }
  </code></pre>
  
  <p>I want to sort <code>Street</code> HashMap of <code>House</code> HashMap on the base of <code>Room</code> class property named roomCapacity.</p>
  
  <p>Means, every street should have sorted house by room capacity.</p>
  
  <pre><code>Map&lt;Street, Map&lt;Long, House&gt;&gt; streetMapFromDB = map;
  Map&lt;Street, Map&lt;Long, House&gt;&gt; streetMap =null;
  Comparator&lt;Room&gt; orderByRoomCapacity = Comparator.nullsLast(Comparator.comparing(Room::getRoomCapacity, Comparator.nullsLast(Comparator.reverseOrder())));
  streetMap = Collections.synchronizedMap(streetMapFromDB.values().stream().map(
                  m -&gt; m.entrySet().stream().sorted(Map.Entry.&lt;String, House&gt; comparingByValue(orderByRoomCapacity ))
                  .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (e1, e2) -&gt; e2, LinkedHashMap::new)))
                  .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)));
  </code></pre>
  
  <p>But I am getting error: <code>type Map.Entry does not define getValue(LinkedHashMap&lt;String,House&gt;)</code></p>
  
  <p><strong>Data Format:</strong></p>
  
  <pre><code>//streetMap={Street={House={RoomCapacity}},{House={RoomCapacity}}}
  streetMapFromDB={1={11={4}),2={12={7}}}
  </code></pre>