File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change 1- import java .nio .file .OpenOption ;
21import java .util .ArrayList ;
32import java .util .Comparator ;
43import java .util .List ;
@@ -25,12 +24,15 @@ public int getTotalOfAllGoalsByMidfielders() {
2524 }
2625
2726 public Optional <String > getNameOfVfLWolfsburgFootballerWithMostPlayedGames () {
28- Predicate <Footballer > isFromWolfsburg = footballer -> footballer .footballClub ()
29- .equals (new FootballClub ("VfL Wolfsburg" , 3 , 1145 ));
30- Comparator <Footballer > sortNumberOfGoalsAscending = (footballer1 , footballer2 ) -> Integer
31- .valueOf (footballer1 .numberOfGames ()).compareTo (footballer2 .numberOfGames ());
27+ Predicate <Footballer > isFromWolfsburg =
28+ footballer -> footballer .footballClub ().equals (new FootballClub ("VfL Wolfsburg" , 3 , 1145 ));
29+ Comparator <Footballer > sortNumberOfGoalsAscending =
30+ (footballer1 , footballer2 ) ->
31+ Integer .valueOf (footballer1 .numberOfGames ()).compareTo (footballer2 .numberOfGames ());
3232
33- return footballers .stream ().filter (isFromWolfsburg ).max (sortNumberOfGoalsAscending )
33+ return footballers .stream ()
34+ .filter (isFromWolfsburg )
35+ .max (sortNumberOfGoalsAscending )
3436 .map (footballer -> footballer .name ());
3537 }
3638
You can’t perform that action at this time.
0 commit comments