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
For example, say we have a bean Foo with a property List<String> names and a map property Map<String, String> attributes.
Foo
List<String> names
Map<String, String> attributes
I'd like to be able to do this:
Foo foo = Foo.builder() .addNames("name1") .addNames("name2") .putAttributes("attr1", "val1") .putAttributes("attr2", "val2") .build();
This makes for much cleaner code than creating a map or list externally in order to pass it to the builder.
It would be even better if the methods could use the singular, e.g. addName or putAttribute but that's probably a lot to ask and not crucial.
addName
putAttribute
The text was updated successfully, but these errors were encountered:
First pass at add and put methods for building collections and maps w…
fc6d935
…ithin beans (JodaOrg#100).
No branches or pull requests
For example, say we have a bean
Foo
with a propertyList<String> names
and a map propertyMap<String, String> attributes
.I'd like to be able to do this:
This makes for much cleaner code than creating a map or list externally in order to pass it to the builder.
It would be even better if the methods could use the singular, e.g.
addName
orputAttribute
but that's probably a lot to ask and not crucial.The text was updated successfully, but these errors were encountered: