Skip to content

Conversation

@otaviojava
Copy link
Member

The proposal are reduce the number of methods to get a summary, considering that not make sense have two filters when it was already defined in summarizing Monetary method, so:
from:

  MonetarySummaryStatistics summary = getCurrencies().stream()
            .filter(MonetaryFunctions.isCurrency(DOLLAR))
            .collect(MonetaryFunctions.summarizingMonetary(DOLLAR));

to:

 MonetarySummaryStatistics summary = getCurrencies().stream()
            .collect(MonetaryFunctions.summarizingMonetary(DOLLAR));

Another changes was the creation of a decoration to group summary, this way when a currency that was not summarizing, now will return an empty summary instead of a null.

👼 Test passed

otaviojava pushed a commit that referenced this pull request Sep 17, 2014
@otaviojava otaviojava merged commit b0ff272 into JavaMoney:master Sep 17, 2014
@otaviojava otaviojava deleted the refactor_summary branch September 17, 2014 21:02
c-delanneau pushed a commit to c-delanneau/jsr354-ri that referenced this pull request Sep 17, 2018
added MonetaryAmount methods to spec file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant