From 549b1013740e7a95b5ab8ccb0f97f419a0dedb19 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Thu, 14 Oct 2010 06:45:49 +0200 Subject: [PATCH] Store first, middle, and last name. --- .../java/net/pterodactylus/sone/data/Profile.java | 79 +++++++++++++++++++++- 1 file changed, 77 insertions(+), 2 deletions(-) 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; } } -- 2.7.4