Back to project page guides.
The source code is released under:
GNU General Public License
If you think the Android project guides listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
// Guidebook is an Android application that reads audioguides using Text-to-Speech services. // Copyright (C) 2013 Adrin Romero Corchado ///*from w w w. ja va2 s. c o m*/ // 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 com.adrguides.model; import android.os.Parcel; import android.os.Parcelable; import java.util.ArrayList; import java.util.List; /** * Created by adrian on 20/08/13. */ public class Place implements Parcelable { private String id; // nulllable private String title; // not null private List<Section> sections = new ArrayList<Section>(); public Place() { id = null; title = "* * *"; } public String getId() { return id; } public void setId(String id) { this.id = id; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public String getVisibleLabel() { return (id == null ? "" : id + " - ") + title; } public List<Section> getSections() { return sections; } public void setSections(List<Section> sections) { this.sections = sections; } @Override public String toString() { return title; } @Override public int describeContents() { return 0; } @Override public void writeToParcel(Parcel parcel, int i) { parcel.writeString(getId()); parcel.writeString(getTitle()); parcel.writeTypedList(getSections()); } public static final Parcelable.Creator<Place> CREATOR = new Parcelable.Creator<Place>() { public Place createFromParcel(Parcel in) { Place place = new Place(); place.setId(in.readString()); place.setTitle(in.readString()); place.setSections(in.createTypedArrayList(Section.CREATOR)); return place; } public Place[] newArray(int size) { return new Place[size]; } }; }