PageRenderTime 30ms CodeModel.GetById 23ms app.highlight 6ms RepoModel.GetById 0ms app.codeStats 0ms

/src/ChatAppServer/Account.java

https://bitbucket.org/blitz2145/cop4331-chat-application
Java | 87 lines | 46 code | 7 blank | 34 comment | 0 complexity | 532d8cc586f849c65d7b6c717e607368 MD5 | raw file
 1package ChatAppServer;
 2
 3import java.net.InetAddress;
 4
 5public class Account {
 6	/**
 7	 * Constructs an account represent a user on the server
 8	 */
 9	public Account(String user, String pass, InetAddress ip, String em) {
10		// TODO: Validate info checking for invalid usernames, etc.
11		username = user;
12		password = pass;
13		ipAddress = ip;
14		email = em;
15		isLoggedIn = false;
16	}
17	
18	/**
19	 * @return the username
20	 */
21	public String getUsername() {
22		return username;
23	}
24	/**
25	 * @param username the username to set
26	 */
27	public void setUsername(String username) {
28		this.username = username;
29	}
30	/**
31	 * @return the password
32	 */
33	public String getPassword() {
34		return password;
35	}
36	/**
37	 * @param password the password to set
38	 */
39	public void setPassword(String password) {
40		this.password = password;
41	}
42	/**
43	 * @return the ipAddress
44	 */
45	public InetAddress getIpAddress() {
46		return ipAddress;
47	}
48	/**
49	 * @param ipAddress the ipAddress to set
50	 */
51	public void setIpAddress(InetAddress ipAddress) {
52		this.ipAddress = ipAddress;
53	}
54	
55	/**
56	 * @return the login status
57	 */
58	public boolean getIsLoggedIn() {
59		return isLoggedIn;
60	}
61
62	/**
63	 * @param status the login status to set
64	 */
65	public void setIsLoggedIn(boolean status) {
66		isLoggedIn = status;
67	}
68	
69	/**
70	 * @return the email
71	 */
72	public String getEmail() {
73		return email;
74	}
75	/**
76	 * @param email the email to set
77	 */
78	public void setEmail(String email) {
79		this.email = email;
80	}
81
82	private boolean isLoggedIn;
83	private String username;
84	private String password;
85	private String email;
86	private InetAddress ipAddress;
87}