aboutsummaryrefslogtreecommitdiffstats
path: root/src/de/gultsch/chat/entities/Contact.java
blob: 66221f8a3f2c0acf0f3d410f9af08085e9011350 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package de.gultsch.chat.entities;

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;
	}

	public String getProfilePhoto() {
		return photo;
	}

	public String getJid() {
		return this.jid;
	}
	
	public boolean match(String needle) {
		return (jid.toLowerCase().contains(needle.toLowerCase()) || (display_name.toLowerCase().contains(needle.toLowerCase())));
	}
}