Methods Summary |
---|
public void | addPropertyChangeListener(java.beans.PropertyChangeListener l)
this.changes.addPropertyChangeListener(l);
|
static java.lang.String | balanceToString(double balance)
return numFormat.format(balance);
|
public java.lang.String | getAccountNumber()
return this.acctNumber;
|
public int | getAccountType()
return this.acctType;
|
public double | getBalance()
return this.balance;
|
public void | removePropertyChangeListener(java.beans.PropertyChangeListener l)
this.changes.removePropertyChangeListener(l);
|
public void | setBalance(double balance)
Double oldBalance = new Double(this.balance);
this.balance = balance;
this.changes.firePropertyChange("balance",
oldBalance, new Double(balance));
|
static java.lang.String | typeToString(int acctType)
switch (acctType) {
case CHECKING:
return "CHECKING";
case SAVINGS:
return "SAVINGS";
default:
throw new IllegalArgumentException(
"Unknown account type: " + acctType);
}
|
public void | writeCsv(java.io.PrintWriter pw)
pw.print(typeToString(this.acctType));
pw.print(",");
pw.print(this.acctNumber);
pw.print(",");
pw.print(balanceToString(this.balance));
|