aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations/entities/Roster.java
diff options
context:
space:
mode:
authoriNPUTmice <daniel@gultsch.de>2014-08-31 16:28:21 +0200
committeriNPUTmice <daniel@gultsch.de>2014-08-31 16:28:21 +0200
commit1ac5be485502e7d6d4c117335e083c684739e6af (patch)
tree279c22e269158dde838f31ebcf3daf4272573583 /src/eu/siacs/conversations/entities/Roster.java
parent8d456085e57334dc34707a49666006619e2c77c6 (diff)
some code cleanup
Diffstat (limited to '')
-rw-r--r--src/eu/siacs/conversations/entities/Roster.java20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/eu/siacs/conversations/entities/Roster.java b/src/eu/siacs/conversations/entities/Roster.java
index aa328664..c6212f77 100644
--- a/src/eu/siacs/conversations/entities/Roster.java
+++ b/src/eu/siacs/conversations/entities/Roster.java
@@ -9,16 +9,16 @@ public class Roster {
Account account;
ConcurrentHashMap<String, Contact> contacts = new ConcurrentHashMap<String, Contact>();
private String version = null;
-
+
public Roster(Account account) {
this.account = account;
}
-
+
public boolean hasContact(String jid) {
String cleanJid = jid.split("/")[0];
return contacts.containsKey(cleanJid);
}
-
+
public Contact getContact(String jid) {
String cleanJid = jid.split("/")[0].toLowerCase(Locale.getDefault());
if (contacts.containsKey(cleanJid)) {
@@ -32,19 +32,19 @@ public class Roster {
}
public void clearPresences() {
- for(Contact contact : getContacts()) {
+ for (Contact contact : getContacts()) {
contact.clearPresences();
}
}
-
+
public void markAllAsNotInRoster() {
- for(Contact contact : getContacts()) {
+ for (Contact contact : getContacts()) {
contact.resetOption(Contact.Options.IN_ROSTER);
}
}
-
+
public void clearSystemAccounts() {
- for(Contact contact : getContacts()) {
+ for (Contact contact : getContacts()) {
contact.setPhotoUri(null);
contact.setSystemName(null);
contact.setSystemAccount(null);
@@ -58,13 +58,13 @@ public class Roster {
public void initContact(Contact contact) {
contact.setAccount(account);
contact.setOption(Contact.Options.IN_ROSTER);
- contacts.put(contact.getJid(),contact);
+ contacts.put(contact.getJid(), contact);
}
public void setVersion(String version) {
this.version = version;
}
-
+
public String getVersion() {
return this.version;
}