void () { String[] values = {"a", "b", "c"}; Map<String, List<Object>> map = IntStream.range(0, values.length).boxed().collect(Collectors.groupingBy(i -> "X" + i, Collectors.mapping(i -> values[i], Collectors.toList()))); }