I want to translate a List of objects into a Map using Java 8\'s streams and lambdas.
This is how I would write it in Java 7 and below.
private Map&l
You can create a Stream of the indices using an IntStream and then convert them to a Map :
Map map = IntStream.range(0,items.size()) .boxed() .collect(Collectors.toMap (i -> i, i -> items.get(i)));