title: Get top 3 counts from list using stream
body: <p>I am trying to convert java7 program into java 8. I want below output using stream API.</p>
  
  <pre><code>public List&lt;String&gt; getTopThreeWeatherCondition7() {
      List&lt;String&gt; _Top3WeatherList = new ArrayList&lt;String&gt;();
      Map&lt;String, Integer&gt; _WeatherCondMap = getWeatherCondition7();
      List&lt;Integer&gt; _WeatherCondList = new ArrayList&lt;Integer&gt;(_WeatherCondMap.values());
      Collections.sort(_WeatherCondList, Collections.reverseOrder());
      List&lt;Integer&gt; _TopThreeWeathersList = _WeatherCondList.subList(0, 3);
      Set&lt;String&gt; _WeatherCondSet = _WeatherCondMap.keySet();
      Integer count = 0;
      for (String _WeatherCond : _WeatherCondSet) {
          count = _WeatherCondMap.get(_WeatherCond);
          for (Integer _TopThreeWeather : _TopThreeWeathersList) {
              if (_TopThreeWeather == count) {
                  _Top3WeatherList.add(_WeatherCond);
              }
          }
      }
      _WeatherCondList = null;
      _WeatherCondMap = null;
      _TopThreeWeathersList = null;
      _WeatherCondSet = null;
      return _Top3WeatherList;
  
  }
  </code></pre>