langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac/Util.java
changeset 31116 2c8162f88493
parent 31115 8d8e98052d5d
child 31751 ec251536a004
equal deleted inserted replaced
31115:8d8e98052d5d 31116:2c8162f88493
   226         return intersection;
   226         return intersection;
   227     }
   227     }
   228 
   228 
   229     public static <I, T> Map<I, T> indexBy(Collection<? extends T> c,
   229     public static <I, T> Map<I, T> indexBy(Collection<? extends T> c,
   230                                            Function<? super T, ? extends I> indexFunction) {
   230                                            Function<? super T, ? extends I> indexFunction) {
   231         return c.stream().collect(Collectors.toMap(indexFunction, o -> o));
   231         return c.stream().collect(Collectors.<T, I, T>toMap(indexFunction, o -> o));
   232     }
   232     }
   233 }
   233 }