diff --git a/demo/02/src/main/java/pl/amu/edu/demo/data/Address.java b/demo/02/src/main/java/pl/amu/edu/demo/data/Address.java index 6e13044..9343dc0 100644 --- a/demo/02/src/main/java/pl/amu/edu/demo/data/Address.java +++ b/demo/02/src/main/java/pl/amu/edu/demo/data/Address.java @@ -2,12 +2,20 @@ package pl.amu.edu.demo.data; import lombok.AccessLevel; import lombok.AllArgsConstructor; +import lombok.Builder; import lombok.experimental.FieldDefaults; -@AllArgsConstructor +@AllArgsConstructor(access = AccessLevel.PRIVATE) @FieldDefaults(level = AccessLevel.PUBLIC, makeFinal = true) +@Builder(builderClassName = "AddressBuilder", setterPrefix = "with") public class Address { String addressLine1; String addressLine2; String zipCode; } + +final class AddressBuilder { + String addressLine1; + String addressLine2 = null; + String zipCode; +}