java8/Java8InAction

java8 have filtering method ?

coderpwh1024 opened this issue · 5 comments

int your chap6 Group.java hava a bug , filtering method not in java8 sdk .

0003

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.

switch to previous commit to get first edition code.

git reset --hard ae8122f433f90a8bfed7244cdf6f99271f1d1125

switch to previous commit to get first edition code.

git reset --hard ae8122f433f90a8bfed7244cdf6f99271f1d1125

thanks

int your chap6 Group.java hava a bug , flatMapping method also not in java8 sdk

int your chap6 Group.java hava a bug , flatMapping method also not in java8 sdk

Have you solved this problem??