Is there an equivalent of Javascript's Array.map in Java?
I have been playing with Java 8 :
List<Long> roleList = siteServiceList.stream()
.map(s -> s.getRoleIdList()).collect(Collectors.toList());
but this doesn't work I don't know why the warning says Incompatible Type.
How can I do this in Java8?
List<List<Long>>instead?