As for example, there are two lists:
List list1 = Arrays.asList(1.0, 2.0); List list2 = Arrays.asList(\"one_point_zero\", \"two_p
Instead of using an auxiliary list to hold the indices, you can have them generated by an IntStream.
IntStream
Map map = IntStream.range(0, list1.size()) .boxed() .collect(Collectors.toMap(i -> list1.get(i), i -> list2.get(i)));