Guest User

Untitled

a guest
Mar 13th, 2018
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. public Map<Integer, Collection<String>> myFunction(final List<Collection<String>> strs) {
  2. return strs.stream().collect(Collectors.toMap(List::indexOf, v -> v)); // Error here
  3. }
  4.  
  5. return strs.stream().collect(Collectors.toMap(coll -> strs.indexOf(coll), v -> v));
  6.  
  7. return strs.stream().collect(Collectors.toMap(strs::indexOf, v -> v));
Add Comment
Please, Sign In to add comment