I'm still strugling with Suppliers and Consumers for Java 8, I have this:
final Set<String> roles = new HashSet<>();user.getRoleGroups().forEach(rg -> rg.getRoles().forEach(r -> roles.add(r.getName())));
To get a Set from role names that are inside a list of Roles inside a list of RoleGroups.Pretty sure I could use something in one line with .stream().map() and RoleGroup::getRoles and Role::getName to get this Set. But I don't know how.