@@ -0,0 +1,1412 @@
+package ru.openjudge.server.dao.mapImpl;%0A%0Aimport javafx.util.Pair;%0Aimport ru.openjudge.server.dao.DaoException;%0Aimport ru.openjudge.server.dao.UserDao;%0Aimport ru.openjudge.server.entity.User;%0A%0Aimport java.util.Map;%0Aimport java.util.StringJoiner;%0Aimport java.util.concurrent.ConcurrentHashMap;%0Aimport java.util.concurrent.ConcurrentMap;%0A%0Apublic class UserDaoImpl implements UserDao %7B%0A%0A    private ConcurrentMap%3CLong, User%3E data;%0A%0A    public UserDaoImpl() %7B%0A        data = new ConcurrentHashMap%3C%3E();%0A        %7B%0A            User admin = new User(%22admin%22, %22admin%22);%0A            data.put(0L, admin);%0A        %7D%0A    %7D%0A%0A    @Override%0A    public void save(User user) %7B%0A        data.put(user.getId(), user);%0A    %7D%0A%0A    @Override%0A    public void remove(User user) %7B%0A        data.remove(user.getId());%0A    %7D%0A%0A    @Override%0A    public User getById(Long id) throws DaoException %7B%0A        User user = data.get(id);%0A        if (user == null) %7B%0A            throw new DaoException(String.format(%22User with id = %25d not found%22, id));%0A        %7D%0A        return data.get(id);%0A    %7D%0A%0A    @Override%0A    public User getByLogin(String login) throws DaoException %7B%0A        for (Map.Entry%3CLong, User%3E p : data.entrySet()) %7B%0A            if (p.getValue().getLogin().equals(login)) %7B%0A                return p.getValue();%0A            %7D%0A        %7D%0A        throw new DaoException(String.format(%22User with login = %5C%22%25s%5C%22 not found%22, login));%0A    %7D%0A%7D%0A

add map's class UserDaoImpl