Skip to content
This repository was archived by the owner on Feb 11, 2022. It is now read-only.

Commit 13967fc

Browse files
committed
Implement equals() and hashCode() on Constraint
1 parent a4cc6c9 commit 13967fc

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

core/src/main/java/novoda/lib/sqliteprovider/util/Constraint.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,20 @@ public Constraint(List<String> columns) {
1212
public List<String> getColumns() {
1313
return columns;
1414
}
15+
16+
@Override
17+
public boolean equals(Object o) {
18+
if (this == o) return true;
19+
if (o == null || getClass() != o.getClass()) return false;
20+
21+
Constraint that = (Constraint) o;
22+
23+
return columns.equals(that.columns);
24+
25+
}
26+
27+
@Override
28+
public int hashCode() {
29+
return columns.hashCode();
30+
}
1531
}

0 commit comments

Comments
 (0)