Store first, middle, and last name.
[Sone.git] / src / main / java / net / pterodactylus / sone / data / Profile.java
1 /*
2  * FreenetSone - Profile.java - Copyright © 2010 David Roden
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
16  */
17
18 package net.pterodactylus.sone.data;
19
20 /**
21  * A profile stores personal information about a {@link User}. All information
22  * is optional and can be {@code null}.
23  *
24  * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
25  */
26 public class Profile {
27
28         /** The first name. */
29         private String firstName;
30
31         /** The middle name(s). */
32         private String middleName;
33
34         /** The last name. */
35         private String lastName;
36
37         /**
38          * Creates a new empty profile.
39          */
40         public Profile() {
41                 /* do nothing. */
42         }
43
44         /**
45          * Creates a copy of a profile.
46          *
47          * @param profile
48          *            The profile to copy
49          */
50         public Profile(Profile profile) {
51                 this.firstName = profile.firstName;
52                 this.middleName = profile.middleName;
53                 this.lastName = profile.lastName;
54         }
55
56         //
57         // ACCESSORS
58         //
59
60         /**
61          * Returns the first name.
62          *
63          * @return The first name
64          */
65         public String getFirstName() {
66                 return firstName;
67         }
68
69         /**
70          * Sets the first name.
71          *
72          * @param firstName
73          *            The first name to set
74          */
75         public void setFirstName(String firstName) {
76                 this.firstName = firstName;
77         }
78
79         /**
80          * Returns the middle name(s).
81          *
82          * @return The middle name
83          */
84         public String getMiddleName() {
85                 return middleName;
86         }
87
88         /**
89          * Sets the middle name.
90          *
91          * @param middleName
92          *            The middle name to set
93          */
94         public void setMiddleName(String middleName) {
95                 this.middleName = middleName;
96         }
97
98         /**
99          * Returns the last name.
100          *
101          * @return The last name
102          */
103         public String getLastName() {
104                 return lastName;
105         }
106
107         /**
108          * Sets the last name.
109          *
110          * @param lastName
111          *            The last name to set
112          */
113         public void setLastName(String lastName) {
114                 this.lastName = lastName;
115         }
116
117 }