public Set<BankAccount> getAccountsSatisfying(Checker<BankAccount> checker) {
        Set<BankAccount> result = new HashSet<>();
        for (BankAccount account: accounts)
            if (checker.check(account))
                result.add(account);
        return result;
    }