Skip to content

Added Consumer<Builder> methods to varargs methods. #469

New issue

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

Merged
merged 1 commit into from
Apr 19, 2018

Conversation

millems
Copy link
Contributor

@millems millems commented Apr 18, 2018

No description provided.

@Override
@SafeVarargs
public final Builder recursiveList(Consumer<Builder>... recursiveList) {
recursiveList(Arrays.asList(recursiveList).stream().map(c -> RecursiveStructType.builder().apply(c).build())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you use Stream.of here? Possibly more efficient (not sure how it's implemented) but is a bit more concise too.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated!

@millems millems force-pushed the millem/varargs-consumer-builders branch from ac80d54 to 650581e Compare April 18, 2018 22:41
@kiiadi
Copy link
Contributor

kiiadi commented Apr 18, 2018

Consumer on varargs - mind blown

@millems millems merged commit a263b12 into master Apr 19, 2018
@millems millems deleted the millem/varargs-consumer-builders branch April 19, 2018 18:03
aws-sdk-java-automation added a commit that referenced this pull request Apr 2, 2019
…80238a2f

Pull request: release <- staging/93953e98-41a8-484d-9d32-986980238a2f
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.

3 participants