View Javadoc
1   /*
2    *    Copyright 2016-2026 the original author or authors.
3    *
4    *    Licensed under the Apache License, Version 2.0 (the "License");
5    *    you may not use this file except in compliance with the License.
6    *    You may obtain a copy of the License at
7    *
8    *       https://www.apache.org/licenses/LICENSE-2.0
9    *
10   *    Unless required by applicable law or agreed to in writing, software
11   *    distributed under the License is distributed on an "AS IS" BASIS,
12   *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   *    See the License for the specific language governing permissions and
14   *    limitations under the License.
15   */
16  package examples.simple;
17  
18  import org.jspecify.annotations.Nullable;
19  
20  import java.util.Date;
21  
22  public class PersonWithAddress {
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() {
32          return id;
33      }
34  
35      public void setId(Integer id) {
36          this.id = id;
37      }
38  
39      public @Nullable String getFirstName() {
40          return firstName;
41      }
42  
43      public void setFirstName(String firstName) {
44          this.firstName = firstName;
45      }
46  
47      public @Nullable LastName getLastName() {
48          return lastName;
49      }
50  
51      public void setLastName(LastName lastName) {
52          this.lastName = lastName;
53      }
54  
55      public @Nullable Date getBirthDate() {
56          return birthDate;
57      }
58  
59      public void setBirthDate(Date birthDate) {
60          this.birthDate = birthDate;
61      }
62  
63      public @Nullable String getOccupation() {
64          return occupation;
65      }
66  
67      public void setOccupation(String occupation) {
68          this.occupation = occupation;
69      }
70  
71      public @Nullable Boolean getEmployed() {
72          return employed;
73      }
74  
75      public void setEmployed(Boolean employed) {
76          this.employed = employed;
77      }
78  
79      public @Nullable AddressRecord getAddress() {
80          return address;
81      }
82  
83      public void setAddress(AddressRecord address) {
84          this.address = address;
85      }
86  }