[mud4j-commit] SF.net SVN: mud4j: [124] trunk/mud4j-core/src/java/net/sf/mud4j/account
Status: Pre-Alpha
Brought to you by:
mpurland
From: <mpu...@us...> - 2007-06-03 01:22:33
|
Revision: 124 http://mud4j.svn.sourceforge.net/mud4j/?rev=124&view=rev Author: mpurland Date: 2007-06-02 18:22:30 -0700 (Sat, 02 Jun 2007) Log Message: ----------- Add email address and changes to Account. Modified Paths: -------------- trunk/mud4j-core/src/java/net/sf/mud4j/account/Account.java Added Paths: ----------- trunk/mud4j-core/src/java/net/sf/mud4j/account/EmailAddress.java Modified: trunk/mud4j-core/src/java/net/sf/mud4j/account/Account.java =================================================================== --- trunk/mud4j-core/src/java/net/sf/mud4j/account/Account.java 2007-06-03 01:19:38 UTC (rev 123) +++ trunk/mud4j-core/src/java/net/sf/mud4j/account/Account.java 2007-06-03 01:22:30 UTC (rev 124) @@ -23,8 +23,13 @@ public class Account { // Username of the account private String username; + // Password of the account private String password; + + // Email address for the account + private EmailAddress emailAddress; + /** * Get the password. * @@ -57,4 +62,19 @@ public void setUsername(String username) { this.username = username; } + + /** + * Verify that the given password matches the account's password. + * + * @return true if the password matches. + */ + public boolean verifyPassword(String password) { + + // If the password matches + if (this.getPassword().equals(password)) { + return true; + } + + return false; + } } Added: trunk/mud4j-core/src/java/net/sf/mud4j/account/EmailAddress.java =================================================================== --- trunk/mud4j-core/src/java/net/sf/mud4j/account/EmailAddress.java (rev 0) +++ trunk/mud4j-core/src/java/net/sf/mud4j/account/EmailAddress.java 2007-06-03 01:22:30 UTC (rev 124) @@ -0,0 +1,36 @@ +/** + * Copyright 2006 Matthew Purland (m.p...@gm...) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package net.sf.mud4j.account; + +/** + * + * + * @todo Auto-generated doc stub for EmailAddress. + * + * @author Matthew Purland + */ +public class EmailAddress { + // Email address + private String emailAddress; + + public EmailAddress(String emailAddress) { + this.emailAddress = emailAddress; + } + + public String getEmailAddress() { + return emailAddress; + } +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |