DEV Community

Discussion on: Build a Fluent Interface in Java in Less Than 5 Minutes

Collapse
 
hpj1992 profile image
Harshit

Nice article. Great explanation on each step one by one.

While this is useful to understand what is fluent interfaces, it would be really overkill if we do this for every class we are creating. To avoid that problem, there are already many libraries which provide this builder pattern on existing java objects for free. Example: Lombok.

With just one annotation @Builder on any class would implement this fluent interface by default.

I guess you might be already aware about this, but making a note of that in article would help the reader :)

Collapse
 
awwsmm profile image
Andrew (he/him)

Thanks for reading, Harshit!

This is a good point, but I think that annotations are a bit of an advanced concept -- they'd be a good topic for an article by themselves!