File tree Expand file tree Collapse file tree 2 files changed +22
-0
lines changed
src/main/java/com/diffblue/corebanking Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -193,6 +193,15 @@ public enum AccountState {
193
193
CLOSED
194
194
}
195
195
196
+ @ Override
197
+ public boolean equals (Object o ) {
198
+ if (this == o ) return true ;
199
+ if (o == null ) return false ;
200
+ if (!(o instanceof Account )) return false ;
201
+ Account account = (Account ) o ;
202
+ return accountNumber == account .accountNumber ;
203
+ }
204
+
196
205
/** AccountStatement of an account, which holds the list of all executed transactions. */
197
206
public class AccountStatement {
198
207
private final List <Transaction > transactions ;
Original file line number Diff line number Diff line change 3
3
import com .diffblue .corebanking .account .Account ;
4
4
5
5
public class ComplianceRuleLargeBalance extends ComplianceRule {
6
+
7
+ /**
8
+ * The maximum balance an account can have before it becomes non-compliant.
9
+ */
6
10
public static final long MAX_ACCOUNT_VALUE = 100000 ;
7
11
12
+ /**
13
+ * Checks if the passed account passes or fails this rule.
14
+ *
15
+ * @param account The account to verify compliance.
16
+ */
8
17
@ Override
9
18
public void validateAccountCompliance (final Account account ) {
19
+
20
+ // Make sure the account does not belong to any list.
21
+ //this.forgetAccount(account);
22
+
10
23
if (account == null ) {
11
24
throw new IllegalArgumentException ();
12
25
}
You can’t perform that action at this time.
0 commit comments