Closed KangoV closed 8 months ago
Calling any other method on Grouping.Builder
other than id(String id)
returning a GroupingBuilder
not a Grouping.Builder
so I don't think this actually very helpful.
The more general way of doing this (because Java does not have a true return self
feature) is to parameterize GroupingBuilder<T extends GroupingBuilder>
and then have class Builder extends GroupingBuilder<Builder> {}
@Randgalt would you be open to supporting this? I can provide the PR if needed.
@epkugelmass yes, a PR would be welcome but it must be behind an option. It will be complex to get this right as there are already a ton of options to contend with.
I'd like to subclass the generated builder in order to add more quality of life methods, e.g.: