6
6
7
7
public abstract class ComplianceRule {
8
8
9
- private final List <Account > currentFailedAccounts = new ArrayList <Account >();
10
- private final List <Account > currentPassedAccounts = new ArrayList <Account >();
9
+ private final List <Account > currentNonCompliantAccounts = new ArrayList <Account >();
10
+ private final List <Account > currentCompliantAccounts = new ArrayList <Account >();
11
11
12
12
/**
13
13
*
14
14
* @param account
15
15
*/
16
16
public void addToNonCompliantAccounts (Account account ) {
17
- if (currentFailedAccounts .contains (account )) {
17
+ if (currentNonCompliantAccounts .contains (account )) {
18
18
throw new IllegalStateException ();
19
19
}
20
- currentFailedAccounts .add (account );
20
+ currentNonCompliantAccounts .add (account );
21
21
}
22
22
23
23
/**
24
24
*
25
25
* @param account
26
26
*/
27
27
public void addToCompliantAccounts (Account account ) {
28
- if (currentPassedAccounts .contains (account )) {
28
+ if (currentCompliantAccounts .contains (account )) {
29
29
throw new IllegalStateException ();
30
30
}
31
- currentPassedAccounts .add (account );
31
+ currentCompliantAccounts .add (account );
32
32
}
33
33
34
34
/**
35
35
*
36
36
* @return
37
37
*/
38
- public List <Account > getCurrentFailedAccounts () {
39
- return this .currentFailedAccounts ;
38
+ public List <Account > getNonCompliantAccounts () {
39
+ return this .currentNonCompliantAccounts ;
40
40
}
41
41
42
42
/**
43
43
*
44
44
* @return
45
45
*/
46
- public List <Account > getCurrentPassedAccounts () {
47
- return this .currentPassedAccounts ;
46
+ public List <Account > getCompliantAccounts () {
47
+ return this .currentCompliantAccounts ;
48
48
}
49
49
50
50
/**
@@ -56,16 +56,16 @@ public List<Account> getCurrentPassedAccounts() {
56
56
57
57
/** Purges all accounts from the rules. */
58
58
public void purgeAccounts () {
59
- this .currentFailedAccounts .clear ();
60
- this .currentPassedAccounts .clear ();
59
+ this .currentNonCompliantAccounts .clear ();
60
+ this .currentCompliantAccounts .clear ();
61
61
}
62
62
63
63
/**
64
64
*
65
65
* @param account
66
66
*/
67
67
public void removeFromComplianceLists (Account account ) {
68
- this .currentFailedAccounts .remove (account );
69
- this .currentPassedAccounts .remove (account );
68
+ this .currentNonCompliantAccounts .remove (account );
69
+ this .currentCompliantAccounts .remove (account );
70
70
}
71
71
}
0 commit comments