java8 have filtering method ?
coderpwh1024 opened this issue · 5 comments
coderpwh1024 commented
sankalpbhatia commented
Looks like they added these codes for the 2nd edition. link
You can try
return menu.stream().filter(dish -> dish.getCalories() > 500).collect(groupingBy(Dish::getType));
which will run fine with a java 8 compiler giving the same result. But my $0.02 would be to use the latest jdk if possible.
vbhosle commented
switch to previous commit to get first edition code.
git reset --hard ae8122f433f90a8bfed7244cdf6f99271f1d1125
keepangry commented
switch to previous commit to get first edition code.
git reset --hard ae8122f433f90a8bfed7244cdf6f99271f1d1125
thanks
KitGavinx commented
int your chap6 Group.java hava a bug , flatMapping method also not in java8 sdk
deviltt commented
int your chap6 Group.java hava a bug , flatMapping method also not in java8 sdk
Have you solved this problem??