We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Every aggregating class (Nodes, Contents, etc. ) is quite often collected from streams in an inconvenient way:
Nodes.from( collection.stream()...collect( Collectors.toList() ) );
There is a way to improve them with an util method:
public static Collector<Node, Builder, Nodes> collecting() { return Collector.of( Builder::new, Builder::add, ( left, right ) -> left.addAll( right.build() ), Builder::build ); }
As a result:
collection.stream()...collect( Nodes.collecting() );
The text was updated successfully, but these errors were encountered:
vbradnitski
No branches or pull requests
Every aggregating class (Nodes, Contents, etc. ) is quite often collected from streams in an inconvenient way:
There is a way to improve them with an util method:
As a result:
The text was updated successfully, but these errors were encountered: