|
15 | 15 | */
|
16 | 16 | package examples.simple;
|
17 | 17 |
|
| 18 | +import org.jspecify.annotations.Nullable; |
| 19 | + |
18 | 20 | import java.util.Date;
|
19 | 21 |
|
20 | 22 | public class PersonWithAddress {
|
21 |
| - private Integer id; |
22 |
| - private String firstName; |
23 |
| - private LastName lastName; |
24 |
| - private Date birthDate; |
25 |
| - private Boolean employed; |
26 |
| - private String occupation; |
27 |
| - private AddressRecord address; |
28 |
| - |
29 |
| - public Integer getId() { |
| 23 | + private @Nullable Integer id; |
| 24 | + private @Nullable String firstName; |
| 25 | + private @Nullable LastName lastName; |
| 26 | + private @Nullable Date birthDate; |
| 27 | + private @Nullable Boolean employed; |
| 28 | + private @Nullable String occupation; |
| 29 | + private @Nullable AddressRecord address; |
| 30 | + |
| 31 | + public @Nullable Integer getId() { |
30 | 32 | return id;
|
31 | 33 | }
|
32 | 34 |
|
33 | 35 | public void setId(Integer id) {
|
34 | 36 | this.id = id;
|
35 | 37 | }
|
36 | 38 |
|
37 |
| - public String getFirstName() { |
| 39 | + public @Nullable String getFirstName() { |
38 | 40 | return firstName;
|
39 | 41 | }
|
40 | 42 |
|
41 | 43 | public void setFirstName(String firstName) {
|
42 | 44 | this.firstName = firstName;
|
43 | 45 | }
|
44 | 46 |
|
45 |
| - public LastName getLastName() { |
| 47 | + public @Nullable LastName getLastName() { |
46 | 48 | return lastName;
|
47 | 49 | }
|
48 | 50 |
|
49 | 51 | public void setLastName(LastName lastName) {
|
50 | 52 | this.lastName = lastName;
|
51 | 53 | }
|
52 | 54 |
|
53 |
| - public Date getBirthDate() { |
| 55 | + public @Nullable Date getBirthDate() { |
54 | 56 | return birthDate;
|
55 | 57 | }
|
56 | 58 |
|
57 | 59 | public void setBirthDate(Date birthDate) {
|
58 | 60 | this.birthDate = birthDate;
|
59 | 61 | }
|
60 | 62 |
|
61 |
| - public String getOccupation() { |
| 63 | + public @Nullable String getOccupation() { |
62 | 64 | return occupation;
|
63 | 65 | }
|
64 | 66 |
|
65 | 67 | public void setOccupation(String occupation) {
|
66 | 68 | this.occupation = occupation;
|
67 | 69 | }
|
68 | 70 |
|
69 |
| - public Boolean getEmployed() { |
| 71 | + public @Nullable Boolean getEmployed() { |
70 | 72 | return employed;
|
71 | 73 | }
|
72 | 74 |
|
73 | 75 | public void setEmployed(Boolean employed) {
|
74 | 76 | this.employed = employed;
|
75 | 77 | }
|
76 | 78 |
|
77 |
| - public AddressRecord getAddress() { |
| 79 | + public @Nullable AddressRecord getAddress() { |
78 | 80 | return address;
|
79 | 81 | }
|
80 | 82 |
|
|
0 commit comments