This post shows how to use Java Streams introduced in Java 8 to obtain a Map from a List using the method Collectors.toMap.Java 8 Streams: Convert List into Map2018-03-30 in Java tagged Collector / Java / Java 8 / List / Map / Streams by Marc Nuri