Android Open Source - DisposableIncome-OldJava Cash Withdraw






From Project

Back to project page DisposableIncome-OldJava.

License

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.

Java Source Code

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




Java Source Code List

uk.co.wilka.disposableincome.CalendarAccess.java
uk.co.wilka.disposableincome.CalendarProvider.java
uk.co.wilka.disposableincome.CashWithdraw.java
uk.co.wilka.disposableincome.CashWithdrawalDetailsActivity.java
uk.co.wilka.disposableincome.Cash.java
uk.co.wilka.disposableincome.DatabaseHelper.java
uk.co.wilka.disposableincome.IAccessData.java
uk.co.wilka.disposableincome.IProvideCalendar.java
uk.co.wilka.disposableincome.MainActivity.java
uk.co.wilka.disposableincome.PlusOneMonthCalendarProvider.java
uk.co.wilka.disposableincome.WithdrawDateComparer.java
uk.co.wilka.disposableincome.WithdrawType.java
uk.co.wilka.disposableincome.WithdrawalForMonthCalculator.java
uk.co.wilka.disposableincome.test.CashTest.java
uk.co.wilka.disposableincome.test.CashWithdrawTest.java
uk.co.wilka.disposableincome.test.FakeCalendarProvider.java
uk.co.wilka.disposableincome.test.PlusOneMonthCalendarProviderTests.java
uk.co.wilka.disposableincome.test.WithdrawDateComparerTests.java
uk.co.wilka.disposableincome.test.WithdrawalForMonthCalculatorTests.java