mappedTo -> join?
Remi Forax
forax at univ-mlv.fr
Tue Jan 8 10:11:36 PST 2013
On 01/08/2013 06:12 PM, Brian Goetz wrote:
> One of the reducers we've got takes a Stream<T> and a function T->U
> and creates a Map<T,U>. Currently we call this "mappedTo". Should
> this be called "join" instead? Or mapJoin?
>
> Map<Person, Integer> map = people.reduce(mappedTo(Person::getAge)));
> vs
> Map<Person, Integer> map = people.reduce(join(Person::getAge)));
> Map<Person, Integer> map = people.reduce(mapJoin(Person::getAge)));
or just toMap,
Map<Person, Integer> map = people.reduce(Reducer.toMap(Person::getAge)));
Rémi
More information about the lambda-libs-spec-observers
mailing list