Back to project page DisposableIncome-OldJava.
The source code is released under:
MIT License
If you think the Android project DisposableIncome-OldJava 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 uk.co.wilka.disposableincome; /*from w w w .j a v a2 s. c o m*/ import android.os.Parcel; import android.os.Parcelable; import java.util.Date; public class CashWithdraw implements Parcelable { private final Date date; private final Cash amount; private final WithdrawType withdrawType; private final String notes; public CashWithdraw(Date date, Cash amount, WithdrawType withdrawType, String notes) { this.date = date; this.amount = amount; this.withdrawType = withdrawType; this.notes = notes; } public Date getDate() { return date; } public Cash getAmount() { return amount; } public WithdrawType getWithdrawType() { return withdrawType; } public String getNotes() { return notes; } public int describeContents() { return 0; } public void writeToParcel(Parcel out, int flags) { out.writeLong(date.getTime()); out.writeInt(amount.getPence()); out.writeString(notes); out.writeInt(withdrawType.getId()); } private CashWithdraw(Parcel in) { date = new Date(in.readLong()); amount = Cash.fromPence(in.readInt()); notes = in.readString(); withdrawType = WithdrawType.fromId(in.readInt()); } public static final Parcelable.Creator<CashWithdraw> CREATOR = new Parcelable.Creator<CashWithdraw>() { public CashWithdraw createFromParcel(Parcel in) { return new CashWithdraw(in); } public CashWithdraw[] newArray(int size) { return new CashWithdraw[size]; } }; }