Mapping a list to Map Java 8 stream and groupingBy
问题 I have this simple Bean class: public class Book { public Book(Map<String, String> attribute) { super(); this.attribute = attribute; } //key is isbn, val is author private Map<String, String> attribute; public Map<String, String> getAttribute() { return attribute; } public void setAttribute(Map<String, String> attribute) { this.attribute = attribute; } } In my main class, I have added some information to the List: Map<String, String> book1Details = new HashMap<String, String>(); book1Details