Randgalt / record-builder

Record builder generator for Java records
Apache License 2.0
758 stars 55 forks source link

Optional functional methods for With #83

Closed Randgalt closed 2 years ago

Randgalt commented 3 years ago

When enabled, some functional methods are added to the With nested class.

E.g.

@RecordBuilder
record MyRecord<T>(String name, T value, int qty) implements MyRecordBuilder.With<T> {}

...

MyRecord<Thing> r = ...

var other = r.map((name, value, qty) -> new Other(...));

// also

r.accept((name, value, qty) -> {
   ...
});
ishanarora04 commented 3 years ago

@Randgalt I would like to contribute to this repo. If you any have any feature/bug fixes on top of your mind , please let me know.