package net.ktnx.mobileledger.model;
+import android.support.annotation.NonNull;
+
import java.util.Date;
public class TransactionListItem {
private Date date;
private boolean monthShown;
private LedgerTransaction transaction;
+ private boolean odd;
+ public TransactionListItem() {
+ this.type = Type.TRAILER;
+ }
public TransactionListItem(Date date, boolean monthShown) {
this.type = Type.DELIMITER;
this.date = date;
this.monthShown = monthShown;
}
- public TransactionListItem(LedgerTransaction transaction) {
+ public TransactionListItem(LedgerTransaction transaction, boolean isOdd) {
this.type = Type.TRANSACTION;
this.transaction = transaction;
+ this.odd = isOdd;
}
+ @NonNull
public Type getType() {
return type;
}
public LedgerTransaction getTransaction() {
return transaction;
}
- public enum Type {TRANSACTION, DELIMITER}
+ public boolean isOdd() {
+ return odd;
+ }
+ public enum Type {TRANSACTION, DELIMITER, TRAILER}
}