package ru.matevosyan;

import java.util.*;

public class UserConverter {


    public HashMap<Integer, User> process(List<User> list) {

        Iterator<User> userIterator = list.listIterator();
        HashMap<Integer, User> userMap = new HashMap<>();
        while (userIterator.hasNext()) {
            User user = userIterator.next();
            userMap.put(user.getId(), user);
        }
        return userMap;
    }

}

@@ -17,16 +17,17 @@
 osyan;%0A%0A
+%0A
 import j
@@ -39,41 +39,365 @@
 til.
-*;%0A%0Apublic class UserConverter %7B%0A
+HashMap;%0Aimport java.util.List;%0Aimport java.util.Iterator;%0A%0A/**%0A * Created UserConverter to convert list to map.%0A * Created on 28.04.2017.%0A * @author Matevosyan Vardan%0A * @version 1.0%0A */%0A%0Apublic class UserConverter %7B%0A%0A    /**%0A     * process method was created to convert array list to map.%0A     * @param list list of users.%0A     * @return user map.%0A     */
 %0A%0A  

add javadoc