2014-01-24 22:58:51 +00:00
|
|
|
package de.gultsch.chat.entities;
|
2014-01-24 01:04:05 +00:00
|
|
|
|
|
|
|
import java.io.Serializable;
|
|
|
|
|
|
|
|
import android.net.Uri;
|
|
|
|
|
|
|
|
public class Contact implements Serializable {
|
|
|
|
private static final long serialVersionUID = -4570817093119419962L;
|
|
|
|
protected String display_name;
|
|
|
|
protected String jid;
|
|
|
|
protected String photo;
|
|
|
|
|
|
|
|
public Contact(String display_name, String jid, String photo) {
|
|
|
|
this.display_name = display_name;
|
|
|
|
this.jid = jid;
|
|
|
|
this.photo = photo;
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getDisplayName() {
|
|
|
|
return this.display_name;
|
|
|
|
}
|
|
|
|
|
2014-02-01 00:25:56 +00:00
|
|
|
public String getProfilePhoto() {
|
|
|
|
return photo;
|
2014-01-24 01:04:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public String getJid() {
|
|
|
|
return this.jid;
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean match(String needle) {
|
|
|
|
return (jid.toLowerCase().contains(needle.toLowerCase()) || (display_name.toLowerCase().contains(needle.toLowerCase())));
|
|
|
|
}
|
|
|
|
}
|