forked from hummel/Bank-System
test
parent
94a9feba9f
commit
95033b45a1
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue