Пример #1
0
 public void makeAccounts(int n) {
   for (int i = 1; i < n; i++) {
     Account acc = new Account("Konto nr " + i, BigDecimal.ONE);
     acc.setId((long) i);
     accounts.add(acc);
   }
 }
Пример #2
0
 public Account getAccountByName(List<Account> accounts, String accountName) {
   for (Account account : accounts) {
     if (account.nameProperty().get().equalsIgnoreCase(accountName)) return account;
   }
   return null;
 }