+ public String getAmountsString(int limit) {
+ if ((amounts == null) || amounts.isEmpty())
+ return "";
+
+ int included = 0;
+ StringBuilder builder = new StringBuilder();
+ for (LedgerAmount amount : amounts) {
+ String amt = amount.toString();
+ if (builder.length() > 0)
+ builder.append('\n');
+ builder.append(amt);
+ included++;
+ if (included == limit)
+ break;
+ }