public String getAccountName() {
return accountName;
}
+ public String getShortAccountName() {
+ String result = accountName;
+ result = result.replaceAll("(?<=^|:)(.)[^:]+(?=:)", "$1");
+ return result;
+ }
public void setAccountName(String accountName) {
this.accountName = accountName;
}
public float getAmount() {
- if (!amountSet)
- throw new IllegalStateException("Account amount is not set");
+ if (!amountSet) throw new IllegalStateException("Account amount is not set");
return amount;
}