From: David ‘Bombe’ Roden Date: Thu, 14 Oct 2010 04:45:49 +0000 (+0200) Subject: Store first, middle, and last name. X-Git-Tag: 0.1-RC1~443 X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=commitdiff_plain;h=549b1013740e7a95b5ab8ccb0f97f419a0dedb19 Store first, middle, and last name. --- diff --git a/src/main/java/net/pterodactylus/sone/data/Profile.java b/src/main/java/net/pterodactylus/sone/data/Profile.java index 255dacb..eeb04a4 100644 --- a/src/main/java/net/pterodactylus/sone/data/Profile.java +++ b/src/main/java/net/pterodactylus/sone/data/Profile.java @@ -18,16 +18,27 @@ package net.pterodactylus.sone.data; /** - * A profile stores personal information about a {@link User}. + * A profile stores personal information about a {@link User}. All information + * is optional and can be {@code null}. * * @author David ‘Bombe’ Roden */ public class Profile { + /** The first name. */ + private String firstName; + + /** The middle name(s). */ + private String middleName; + + /** The last name. */ + private String lastName; + /** - * Creates a new profile. + * Creates a new empty profile. */ public Profile() { + /* do nothing. */ } /** @@ -37,6 +48,70 @@ public class Profile { * The profile to copy */ public Profile(Profile profile) { + this.firstName = profile.firstName; + this.middleName = profile.middleName; + this.lastName = profile.lastName; + } + + // + // ACCESSORS + // + + /** + * Returns the first name. + * + * @return The first name + */ + public String getFirstName() { + return firstName; + } + + /** + * Sets the first name. + * + * @param firstName + * The first name to set + */ + public void setFirstName(String firstName) { + this.firstName = firstName; + } + + /** + * Returns the middle name(s). + * + * @return The middle name + */ + public String getMiddleName() { + return middleName; + } + + /** + * Sets the middle name. + * + * @param middleName + * The middle name to set + */ + public void setMiddleName(String middleName) { + this.middleName = middleName; + } + + /** + * Returns the last name. + * + * @return The last name + */ + public String getLastName() { + return lastName; + } + + /** + * Sets the last name. + * + * @param lastName + * The last name to set + */ + public void setLastName(String lastName) { + this.lastName = lastName; } }