aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/User.java
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2016-01-10 19:57:49 +0300
committerGravatar Vitaly Takmazov2016-01-10 19:57:49 +0300
commitd7f4564910568e289273f575b7972a745661956d (patch)
tree55224746636999bb809d84ab40bb3aace5f0a43c /src/main/java/com/juick/User.java
parent5f08b8b1cfaacf1e78c56e7752277533eb84b02e (diff)
refactoring
Diffstat (limited to 'src/main/java/com/juick/User.java')
-rw-r--r--src/main/java/com/juick/User.java62
1 files changed, 51 insertions, 11 deletions
diff --git a/src/main/java/com/juick/User.java b/src/main/java/com/juick/User.java
index e3fc0ae7e..40a3df963 100644
--- a/src/main/java/com/juick/User.java
+++ b/src/main/java/com/juick/User.java
@@ -23,31 +23,71 @@ package com.juick;
*/
public class User {
- public int UID = 0;
- public String UName = null;
+ private int UID = 0;
+ private String UName = null;
public Object Avatar = null;
- public String FullName = null;
- public String JID = null;
+ private String FullName = null;
+ private String JID = null;
public int MessagesCount = 0;
- public String AuthHash = null;
+ private String AuthHash = null;
public boolean Banned = false;
public User() {
}
public User(User u) {
- UID = u.UID;
- UName = u.UName;
+ setUID(u.getUID());
+ setUName(u.getUName());
Avatar = u.Avatar;
- FullName = u.FullName;
- JID = u.JID;
+ setFullName(u.getFullName());
+ setJID(u.getJID());
MessagesCount = u.MessagesCount;
- AuthHash = u.AuthHash;
+ setAuthHash(u.getAuthHash());
Banned = u.Banned;
}
@Override
public boolean equals(Object obj) {
- return (obj instanceof User && ((User) obj).UID == this.UID);
+ return (obj instanceof User && ((User) obj).getUID() == this.getUID());
+ }
+
+ public int getUID() {
+ return UID;
+ }
+
+ public void setUID(int UID) {
+ this.UID = UID;
+ }
+
+ public String getUName() {
+ return UName;
+ }
+
+ public void setUName(String UName) {
+ this.UName = UName;
+ }
+
+ public String getFullName() {
+ return FullName;
+ }
+
+ public void setFullName(String fullName) {
+ FullName = fullName;
+ }
+
+ public String getJID() {
+ return JID;
+ }
+
+ public void setJID(String JID) {
+ this.JID = JID;
+ }
+
+ public String getAuthHash() {
+ return AuthHash;
+ }
+
+ public void setAuthHash(String authHash) {
+ AuthHash = authHash;
}
}