Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

convert list of dto to map java

//Stream apis for versions java8 and above
Map<String, Item> map = 
    list.stream().collect(Collectors.toMap(Item::getKey, item -> item));
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #convert #list #dto #map #java
ADD COMMENT
Topic
Name
3+8 =