Skip to content

Commit

Permalink
Use lambda expressions where possible
Browse files Browse the repository at this point in the history
  • Loading branch information
ripcurlx committed May 10, 2022
1 parent 23347e6 commit 28332b9
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ private Map<Long, Long> getTotalBsqSupplyByInterval(Stream<BsqSupplyChange> bsqS
.collect(Collectors.groupingBy(tx -> toTimeInterval(Instant.ofEpochMilli(tx.getTime()))))
.entrySet()
.stream()
.sorted(Comparator.comparingLong(e -> e.getKey()))
.sorted(Comparator.comparingLong(Map.Entry::getKey))
.map(e -> new BsqSupplyChange(
e.getKey(),
supply.addAndGet(e
Expand Down Expand Up @@ -240,7 +240,7 @@ private Map<Long, Long> getHistoricalIssuedBsqByInterval(Map<Long, Long> histori
.filter(e -> dateFilter.test(e.getKey()))
.collect(Collectors.toMap(e -> toTimeInterval(Instant.ofEpochSecond(e.getKey())),
Map.Entry::getValue,
(a, b) -> a + b));
Long::sum));
}

private Map<Long, Long> getBurntBsqByInterval(Collection<Tx> txs, Predicate<Long> dateFilter) {
Expand Down

0 comments on commit 28332b9

Please sign in to comment.