equal
deleted
inserted
replaced
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.<T, I, T>toMap(indexFunction, o -> o)); |
231 return c.stream().collect(Collectors.<T, I, T>toMap(indexFunction, o -> o)); |
232 } |
232 } |
|
233 |
|
234 public static String fileSuffix(Path file) { |
|
235 String fileNameStr = file.getFileName().toString(); |
|
236 int dotIndex = fileNameStr.indexOf('.'); |
|
237 return dotIndex == -1 ? "" : fileNameStr.substring(dotIndex); |
|
238 } |
233 } |
239 } |