/
Statement.java
41 lines (32 loc) · 977 Bytes
/
Statement.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
package me.panavtec.androidbankkata.account.statement;
import java.util.List;
import me.panavtec.androidbankkata.account.transaction.Transaction;
public class Statement {
private List<Transaction> transactions;
public Statement(List<Transaction> transactions) {
this.transactions = transactions;
}
@Override public String toString() {
return "Statement{" +
"transactions=" + transactions +
'}';
}
@Override public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Statement statement = (Statement) o;
return transactions != null
? transactions.equals(statement.transactions)
: statement.transactions == null;
}
@Override public int hashCode() {
return transactions != null ? transactions.hashCode() : 0;
}
public List<StatementLine> lines() {
throw new UnsupportedOperationException();
}
}