Hallo,
wie kann ich denn mit der .map - Funktion von einem Objekt nochmal dessen Child bekommen.
Also ich habe:
Class1:
- Class2 class2
Class2
- Class3 class3
Also das klappt nicht:
Ich habe die Klasse: AppMarketShoppingCartPosition
Diese hat ein Property getAppMarketProductItemSeller...
AppMarketProductItemSeller hat ein Property AppMarketCommissionSetting...
getAppMarketProductItemSeller ist eine 1...1 Verbindung (also keine Liste oder ähnliches)
Wie kann man das machen?
wie kann ich denn mit der .map - Funktion von einem Objekt nochmal dessen Child bekommen.
Also ich habe:
Class1:
- Class2 class2
Class2
- Class3 class3
Also das klappt nicht:
Java:
BigDecimal feeAmount = listAppMarketShoppingCartPosition.stream()
.map(AppMarketShoppingCartPosition::getAppMarketProductItemSeller::getAppMarketCommissionSetting())
.reduce(BigDecimal.ZERO, BigDecimal::add);
Ich habe die Klasse: AppMarketShoppingCartPosition
Diese hat ein Property getAppMarketProductItemSeller...
AppMarketProductItemSeller hat ein Property AppMarketCommissionSetting...
getAppMarketProductItemSeller ist eine 1...1 Verbindung (also keine Liste oder ähnliches)
Wie kann man das machen?