18 package org.turro.financials.treasury.settlement;
20 import org.turro.math.Zero;
21 import org.turro.util.CompareUtil;
29 private String account, name;
30 private double amount;
31 private boolean checked =
true;
34 this.account = account;
43 return Zero.
near(amount, 2) ? 0.0 : amount;
55 this.checked = checked;
59 return account.matches(
SettlementSet.CREDITOR_EXP.replaceAll(
"\\%",
"[0-9]*"));
63 return account.matches(
SettlementSet.CREDITOR_EXP.replaceAll(
"\\%",
"1[1-9][0-9]*"));
67 return account.matches(
SettlementSet.CREDITOR_EXP.replaceAll(
"\\%",
"0[0-9]*"));
71 return account.matches(
SettlementSet.DEBTOR_EXP.replaceAll(
"\\%",
"[0-9]*")) ||
72 account.matches(
SettlementSet.ON_ACCOUNT_EXP.replaceAll(
"\\%",
"[0-9]*"));
81 return CompareUtil.compare(account, o.account);
SettlementEntry(String account, String name)
int compareTo(SettlementEntry o)
void setAmount(double amount)
void setChecked(boolean checked)
static boolean near(double value, int digits)