-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
fluent setters #270
Comments
👤 jmsachs 🕗 Feb 23, 2011 at 20:31 UTC (mentioned in the Google Groups a few times but doesn't seem to be in the issues list) plain Java: class Foo { public Foo setX(int x) { this.x = x; } use case: Foo foo = new Foo().setX(3).setS("something"); http://groups.google.com/group/project-lombok/browse_thread/thread/5fc7a78e3afed9d8/c203fb9e577d06a4 http://groups.google.com/group/project-lombok/browse_thread/thread/303ebf903908bf7/91d339234766c9cb If this is part of the @ Builder implementation (issue #89), and the fluent setters are easier to implement than the @ Builder, please release this one first. |
👤 jmsachs 🕗 Feb 23, 2011 at 20:32 UTC (this should have been an enhancement, not a defect, sorry) |
👤 jmsachs 🕗 Feb 23, 2011 at 20:35 UTC Darn -- I just noticed issue #88. This is a duplicate. But again, if it's easier to implement than the full @ Builder, please release this first. |
👤 r.spilker 🕗 May 09, 2011 at 19:31 UTC |
👤 reinierz 🕗 May 09, 2011 at 20:58 UTC |
👤 reinierz 🕗 May 09, 2011 at 20:58 UTC Duplicate of issue #88 |
👤 matt@thebishops.org 🕗 Aug 17, 2013 at 19:55 UTC Please reopen. There is a difference between Builder and Fluent; please add a @ Fluent along the lines of this: http://martinfowler.com/bliki/FluentInterface.html The main problem with builder is the build() method. I just want to make a @ Data class with chainable set() methods, not a Builder. The reason for this is that the Data class gets passed up several levels and is manipulated along the way. I'd rather not pass a builder but instead a DTO with fluent setters. |
👤 askoning 🕗 Aug 18, 2013 at 09:41 UTC @ Accessors(fluent=true) should do the trick for you. Please see https://projectlombok.org/features/experimental/Accessors.html |
👤 r.spilker 🕗 Aug 21, 2013 at 15:43 UTC Or @ Wither: https://projectlombok.org/features/experimental/Wither.html |
End of migration |
Migrated from Google Code (issue 197)
The text was updated successfully, but these errors were encountered: