enums
DexterHK 2022-12-12 23:31:15 +01:00
parent 94a9feba9f
commit 95033b45a1
1 changed files with 4 additions and 2 deletions

View File

@ -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<Konto> output = temp.values().stream().flatMap(y -> y.stream())
List<Konto> 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<Konto> 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;