if I have something like this:
List<Person> fetchedPeople
and I want to stream through it and store it into a key-value map where key is the person ID and value is the object itself (here Person)
private Map<String, Person> people;
I tried something like this but it gives me an error:
PersonCache = people.stream()
.collect(toMap(Person::getID, Person));
Thanks for your help