void (final Function<String, ?> compose) { Collector<String, ?, ? extends Map<?, ArrayList<String>>> stringMapCollector = Collectors.groupingBy(compose, Collector.of(() -> new ArrayList<String>(), null, null, s -> new ArrayList<>(s))); }