Stream<Map.Entry<String, List<Object>>> sorted = index.entrySet().stream()
                .sorted(Map.Entry.comparingByValue());
The method
sorted(Comparator<? super Map.Entry<String,List<NFArticle>>>)in the typeStream<Map.Entry<String,List<NFArticle>>>is not applicable for the arguments(Comparator <Map.Entry<Object,Comparable<? super Comparable<? super V>>>>)
I want to sort a Hashmap according to the size() of Lists being the values of the HashMap. How can I achieve this using the Stream library from Java 8?
 
     
     
    