Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public Map<Integer, Collection<String>> myFunction(final List<Collection<String>> strs) {
- return strs.stream().collect(Collectors.toMap(List::indexOf, v -> v)); // Error here
- }
- return strs.stream().collect(Collectors.toMap(coll -> strs.indexOf(coll), v -> v));
- return strs.stream().collect(Collectors.toMap(strs::indexOf, v -> v));
Add Comment
Please, Sign In to add comment