title: Retrieve N most relevant objects in Java TreeMap
body: <p>According to <a href="https://stackoverflow.com/questions/109383/how-to-sort-a-mapkey-value-on-the-values-in-java">this question</a> I have ordered a Java <code>Map</code>, as follows:</p>
  
  <pre><code>ValueComparator bvc =  new ValueComparator(originalMap);
  Map&lt;String,Integer&gt; sortedMap = new TreeMap&lt;String,Integer&gt;(bvc);
  sortedMap.putAll(originalMap);
  </code></pre>
  
  <p>Now, I would like to extract the <code>K</code> most relevant values from the map, in top-K fashion. Is there a highly efficient way of doing it without iterating through the map?</p>
  
  <p>P.S., some similar questions (e.g., <a href="https://stackoverflow.com/questions/5911174/finding-key-associated-with-max-value-in-a-java-map">this</a>) ask for a solution to the top-1 retrieval problem.</p>