From 95033b45a15230ef0e5f49a855566775c04d9fe5 Mon Sep 17 00:00:00 2001 From: DexterHK Date: Mon, 12 Dec 2022 23:31:15 +0100 Subject: [PATCH] test --- .../src/de/hs_mannheim/informatik/bank/domain/Bank.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Bank-Beispiel/src/de/hs_mannheim/informatik/bank/domain/Bank.java b/Bank-Beispiel/src/de/hs_mannheim/informatik/bank/domain/Bank.java index 9931788..2a4714d 100644 --- a/Bank-Beispiel/src/de/hs_mannheim/informatik/bank/domain/Bank.java +++ b/Bank-Beispiel/src/de/hs_mannheim/informatik/bank/domain/Bank.java @@ -57,7 +57,8 @@ public class Bank implements Serializable { case 2: return temp.get(Kontoart.Girokonto); case 3: return temp.get(Kontoart.Tagesgeldkonto); default: - List output = temp.values().stream().flatMap(y -> y.stream()) + List output = temp.values().stream() + .flatMap(y -> y.stream()) .collect(Collectors.toList()); return output; } @@ -66,7 +67,8 @@ public class Bank implements Serializable { public long findMax() { Collection kontenTemp = konten.values(); - long max = kontenTemp.stream().map(n -> n.getKontostand()).max((a,b) -> + long max = kontenTemp.stream().map(n -> n.getKontostand()) + .max((a,b) -> a.compareTo(b)).get(); return max;