Back to project page OrbitCat.
The source code is released under:
GNU General Public License
If you think the Android project OrbitCat listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
/* * This file is part of the PhoneRemoteControl application. *//from w ww . j av a 2 s .co m * Copyright (C) 2014 Florent Rochette (Florent38) <florent dot rochette at gmail dot com> * Copyright (C) 2014 Pierre-Antoine Forestier (Freakfonk) <freakfonk at gmail dot com> * Copyright (C) 2014 Yoann Laissus (Arakmar) <yoann dot laissus at gmail dot com> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package org.phoneremotecontrol.app.contacts; import org.json.JSONException; import org.json.JSONObject; public class Contact { private long id; private String phoneNumber; private String displayName; public Contact(long id, String phoneNumber, String displayName) { this.id = id; this.phoneNumber = phoneNumber; this.displayName = displayName; } public Contact(String phoneNumber, String displayName) { this.phoneNumber = phoneNumber; this.displayName = displayName; } public long getId() { return id; } public String getPhoneNumber() { return phoneNumber; } public String getDisplayName() { return displayName; } public String toString() { return "[phoneNumber = " + phoneNumber + ", displayName = " + displayName + "]"; } public JSONObject toJSON() throws JSONException { JSONObject obj = new JSONObject(); obj.put("phoneNumber", phoneNumber); obj.put("displayName", displayName); return obj; } }