package ru.job4j;

import java.util.*;

/**.
 * Chapter_003
 * Task 3.2.2
 * Create collection HashMap
 *
 * @author Anton Vasilyuk
 * @version 1.0
 * @since 0.1
 */
public class UserConvert {
    /**.
     * Method for convert from List to HashMap
     * @param list
     * @return
     */
    public HashMap<Integer, User> process(List<User> list) {
        Integer id;
        HashMap<Integer, User> hashMapUsers = new HashMap<>();
        for (User user: list) {
            id = user.getId();
            hashMapUsers.put(id, user);
        }
        return hashMapUsers;
    }
}

@@ -464,39 +464,8 @@
 ) %7B%0A
-            id = user.getId();%0A
     
@@ -489,18 +489,28 @@
 ers.put(
-id
+user.getId()
 , user);

add file for chapter_003_3.2.2