Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- map.keySet().forEach(タイプ -> {
- System.out.printf("%s: %s\n", タイプ, map.get(タイプ));
- for (String currency : new String[]{"JPY", "USD"}) {
- for (String name : new String[]{"総額", "正味", "手数料"}){
- BigDecimal 合計 = fields.stream().filter(e -> e.タイプ.equals(タイプ)
- || e.通貨.equals(currency))
- .map(e -> e.get(name)).filter(e -> e.isPresent())
- .map(e -> e.get())
- .reduce(BigDecimal.ZERO, BigDecimal::add);
- System.out.printf("%s合計(%s):%s", name, currency,合計 + "\n");
- }
- }
- System.out.println();
- }
- );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement