diff options
author | Vitaly Takmazov | 2016-04-08 16:22:07 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2016-04-08 16:23:15 +0300 |
commit | 80cd101bf9291cd9e8b1a883e3148ff95c445cc1 (patch) | |
tree | aa44e63c2b2a7a6e09d9b88a858d9a95fd7f693a /src/main/java/com/juick/User.java | |
parent | d23e7fff4da9bbfd7ee85ff34c78de631d55c4a5 (diff) |
encapsulate some properties
Diffstat (limited to 'src/main/java/com/juick/User.java')
-rw-r--r-- | src/main/java/com/juick/User.java | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/src/main/java/com/juick/User.java b/src/main/java/com/juick/User.java index 40a3df963..13df20587 100644 --- a/src/main/java/com/juick/User.java +++ b/src/main/java/com/juick/User.java @@ -28,9 +28,9 @@ public class User { public Object Avatar = null; private String FullName = null; private String JID = null; - public int MessagesCount = 0; + private int unreadCount; private String AuthHash = null; - public boolean Banned = false; + private boolean banned = false; public User() { } @@ -41,9 +41,9 @@ public class User { Avatar = u.Avatar; setFullName(u.getFullName()); setJID(u.getJID()); - MessagesCount = u.MessagesCount; + setUnreadCount(u.getUnreadCount()); setAuthHash(u.getAuthHash()); - Banned = u.Banned; + setBanned(u.isBanned()); } @Override @@ -90,4 +90,20 @@ public class User { public void setAuthHash(String authHash) { AuthHash = authHash; } + + public int getUnreadCount() { + return unreadCount; + } + + public void setUnreadCount(int unreadCount) { + this.unreadCount = unreadCount; + } + + public boolean isBanned() { + return banned; + } + + public void setBanned(boolean banned) { + this.banned = banned; + } } |