Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
@Getter
@AllArgsContrustor
@Builder
class ReallyHugeClass {
private final int param1;
private final int param2;
...
private final int param10;
}
// Too many arguments. Hard to read and maintain.
ReallyHugeClass hugeness = new ReallyHugeClass(1, 32, 12, ..., 231);
// Much better now
ReallyHugeClass otherHugeness = ReallyHugeClass.builder()
.param1(1)
.param2(32)
.param3(12)
...
.param10(231);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment