Closed maxandersen closed 1 year ago
given this:
record Rule(String name, Filter filter, List<Action>) {}
I would love I could do:
RuleBuilder.name("arule").filter(f().from("max@acme.org")).action(markAsSeen()).action(fileTo("folder")).build()
Basically, in addition to generating action(List<Action>) add a action(Action) that builds up the list.
action(List<Action>)
action(Action)
Add this:
@RecordBuilder.Options(addSingleItemCollectionBuilders = true, useImmutableCollections = true)
given this:
record Rule(String name, Filter filter, List<Action>) {}
I would love I could do:
RuleBuilder.name("arule").filter(f().from("max@acme.org")).action(markAsSeen()).action(fileTo("folder")).build()
Basically, in addition to generating
action(List<Action>)
add aaction(Action)
that builds up the list.