You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/11/22 16:09:00 UTC
[jira] [Commented] (GROOVY-8899) Add DGSM `first` and `last`
[ https://issues.apache.org/jira/browse/GROOVY-8899?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16696070#comment-16696070 ]
ASF GitHub Bot commented on GROOVY-8899:
----------------------------------------
GitHub user danielsun1106 opened a pull request:
https://github.com/apache/groovy/pull/828
GROOVY-8899: Add DGSM `first` and `last`
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/danielsun1106/groovy enhance-collectors
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/groovy/pull/828.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #828
----
commit dbeb1881633c4ed43188b2ee9d4bf845fd8a8ff9
Author: danielsun1106 <re...@...>
Date: 2018-11-22T16:07:16Z
GROOVY-8899: Add DGSM `first` and `last`
----
> Add DGSM `first` and `last`
> ---------------------------
>
> Key: GROOVY-8899
> URL: https://issues.apache.org/jira/browse/GROOVY-8899
> Project: Groovy
> Issue Type: Improvement
> Reporter: Daniel Sun
> Assignee: Daniel Sun
> Priority: Major
> Fix For: 3.0.0-alpha-4
>
>
> {code:java}
> void testFirst() {
> assert 2 == Stream.of(2, 3, 6, 5).collect(Collectors.first()).get()
> }
> void testLast() {
> assert 5 == Stream.of(2, 3, 6, 5).collect(Collectors.last()).get()
> }
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)