I have a list of users
Collection<User> userList = groupManager.getUserList(groupName);
Not knowing the Java-Streams API that well, I want to map them into a map as follows: the key would be the user key, and the value would be a list the User object's other properties.
Map<String, List<String>> userDsiplayData = userList.stream()
.collect(Collectors.toMap(User::getKey, **.......**))
I tried to replace **..... ** with Arrays.asList(User::getUsername(), User::getDisplayName(), User::getEmail()) or similar constructs but I can't seem to get it to work.