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  public class AddressRecord {
21      private @Nullable Integer id;
22      private @Nullable String streetAddress;
23      private @Nullable String city;
24      private @Nullable String state;
25      private @Nullable AddressType addressType;
26  
27      public @Nullable Integer getId() {
28          return id;
29      }
30  
31      public void setId(Integer id) {
32          this.id = id;
33      }
34  
35      public @Nullable String getStreetAddress() {
36          return streetAddress;
37      }
38  
39      public void setStreetAddress(String streetAddress) {
40          this.streetAddress = streetAddress;
41      }
42  
43      public @Nullable String getCity() {
44          return city;
45      }
46  
47      public void setCity(String city) {
48          this.city = city;
49      }
50  
51      public @Nullable String getState() {
52          return state;
53      }
54  
55      public void setState(String state) {
56          this.state = state;
57      }
58  
59      public @Nullable AddressType getAddressType() {
60          return addressType;
61      }
62  
63      public void setAddressType(AddressType addressType) {
64          this.addressType = addressType;
65      }
66  
67      public enum AddressType {
68          HOME,
69          BUSINESS
70      }
71  }