Back to project page android_bunble.
The source code is released under:
Apache License
If you think the Android project android_bunble listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.example.android_bunble; /* ww w . ja v a2 s .co m*/ import android.os.Parcel; import android.os.Parcelable; public class Book implements Parcelable{ private String bookName; private String author; private int publishTime; public String getBookName() { return bookName; } public void setBookName(String bookName) { this.bookName = bookName; } public String getAuthor() { return author; } public void setAuthor(String author) { this.author = author; } public int getPublishTime() { return publishTime; } public void setPublishTime(int publishTime) { this.publishTime = publishTime; } public static final Parcelable.Creator<Book> CREATOR = new Creator<Book>() { @Override public Book createFromParcel(Parcel source) { Book mBook = new Book(); mBook.bookName = source.readString(); mBook.author = source.readString(); mBook.publishTime = source.readInt(); return mBook; } @Override public Book[] newArray(int size) { return new Book[size]; } }; @Override public int describeContents() { return 0; } @Override public void writeToParcel(Parcel parcel, int flags) { parcel.writeString(bookName); parcel.writeString(author); parcel.writeInt(publishTime); } }