From 8d36387ef0c769eee00b6e59fb40c2f12ba90e37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Dyda?= Date: Tue, 25 Oct 2022 19:42:38 +0200 Subject: [PATCH] Builder design pattern for Person class. --- demo/02/src/main/java/pl/amu/edu/demo/data/Person.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/demo/02/src/main/java/pl/amu/edu/demo/data/Person.java b/demo/02/src/main/java/pl/amu/edu/demo/data/Person.java index e1b4463..b2d7453 100644 --- a/demo/02/src/main/java/pl/amu/edu/demo/data/Person.java +++ b/demo/02/src/main/java/pl/amu/edu/demo/data/Person.java @@ -2,12 +2,14 @@ package pl.amu.edu.demo.data; import lombok.AccessLevel; import lombok.AllArgsConstructor; +import lombok.Builder; import lombok.experimental.FieldDefaults; import java.time.LocalDate; -@AllArgsConstructor +@AllArgsConstructor(access = AccessLevel.PRIVATE) @FieldDefaults(level = AccessLevel.PUBLIC, makeFinal = true) +@Builder public class Person { String displayName; String firstName;