Skip to content

Commit 2ac6649

Browse files
author
github-actions
committed
Google Java Format
1 parent 1e234c3 commit 2ac6649

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

java2/functionalprogramming/Company.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,15 @@ public int compare(Human h1, Human h2) {
4444
}
4545
});
4646
// // Lambda Funktion - Kurze Syntax
47-
Collections.sort(employees, (Human h1, Human h2) -> h1.age() < h2.age() ? -1 : h1.age() > h2.age() ? 1 : 0);
47+
Collections.sort(
48+
employees, (Human h1, Human h2) -> h1.age() < h2.age() ? -1 : h1.age() > h2.age() ? 1 : 0);
4849

4950
// // Lambda Funktion - Kurze Syntax ohne explizite Datentypen
5051
Collections.sort(employees, (h1, h2) -> h1.age() < h2.age() ? -1 : h1.age() > h2.age() ? 1 : 0);
5152

5253
// // Lambda Funktion - Als Referenzvariable gespeichert
53-
Comparator<Human> ageSorter = (h1, h2) -> h1.age() < h2.age() ? -1 : h1.age() > h2.age() ? 1 : 0;
54+
Comparator<Human> ageSorter =
55+
(h1, h2) -> h1.age() < h2.age() ? -1 : h1.age() > h2.age() ? 1 : 0;
5456
Collections.sort(employees, ageSorter);
5557
}
5658
}

0 commit comments

Comments
 (0)