Re: Interest in CollectionUtils feature

2024-03-20 Thread Gary D. Gregory
Oops, obviously: Stream.of(array).filter(e -> !e.isEmpty()).findFirst(); On 2024/03/20 13:18:49 Gary Gregory wrote: > Hello Marco, > > Good call coming to the mailing list first :-) > > There is a mismatch in concepts in the proposed API IMO. > > But I can't tell for sure since you don't descr

Re: Interest in CollectionUtils feature

2024-03-20 Thread Gary Gregory
Hello Marco, Good call coming to the mailing list first :-) There is a mismatch in concepts in the proposed API IMO. But I can't tell for sure since you don't describe the method: there are no input, output, and edge case descriptions. I would propose the method with what the Javadoc would look

Re: Interest in CollectionUtils feature

2024-03-20 Thread Elliotte Rusty Harold
At first glance, my impression is that this need isn't common or complex enough to justify inclusion. It could probably be straight-forwardedly implemented with lambdas by someone who does need it. That said, if it is added, the signature should probably be CollectionUtils.firstNonEmpty(Collectio

Interest in CollectionUtils feature

2024-03-20 Thread Marco Dell'Anna
Hi, I would like to have a CollectionUtils.firstNotEmpty(List... lists) method. Since commons-collections/CONTRIBUTING.md at master · apache/commons-collections · GitHub says: * If you're planning to implement a new feature