* This file is part of MoLe.
* MoLe is free software: you can distribute it and/or modify it
* under the term of the GNU General Public License as published by
* This file is part of MoLe.
* MoLe is free software: you can distribute it and/or modify it
* under the term of the GNU General Public License as published by
public class TransactionAccumulator {
private final ArrayList<TransactionListItem> list = new ArrayList<>();
private final MainModel model;
public class TransactionAccumulator {
private final ArrayList<TransactionListItem> list = new ArrayList<>();
private final MainModel model;
private SimpleDate earliestDate, latestDate;
private SimpleDate lastDate;
private boolean done;
public TransactionAccumulator(MainModel model) {
this.model = model;
private SimpleDate earliestDate, latestDate;
private SimpleDate lastDate;
private boolean done;
public TransactionAccumulator(MainModel model) {
this.model = model;
public void put(LedgerTransaction transaction, SimpleDate date) {
if (done)
throw new IllegalStateException("Can't put new items after done()");
public void put(LedgerTransaction transaction, SimpleDate date) {
if (done)
throw new IllegalStateException("Can't put new items after done()");