daily pastebin goal
29%
SHARE
TWEET

Untitled

a guest Mar 13th, 2018 50 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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));
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top