private String accountName;
private String shortAccountName;
private float amount;
- private boolean amountSet;
+ private boolean amountSet = false;
private String currency;
public LedgerTransactionAccount(String accountName, float amount) {
public LedgerTransactionAccount(String accountName) {
this.accountName = accountName;
}
+ public LedgerTransactionAccount(LedgerTransactionAccount origin) {
+ // copy constructor
+ setAccountName(origin.getAccountName());
+ if (origin.isAmountSet())
+ setAmount(origin.getAmount());
+ currency = origin.getCurrency();
+ }
public String getAccountName() {
return accountName;