Bulk lookup implementation, part 2

- Remote IS bulk lookup
This commit is contained in:
Maxime Dor
2017-04-04 01:11:32 +02:00
parent 9cfa008422
commit d0b9f6774d
7 changed files with 238 additions and 22 deletions

View File

@@ -20,6 +20,8 @@
package io.kamax.mxisd.lookup;
import groovy.json.JsonOutput;
public class ThreePidMapping {
private String medium;
@@ -50,4 +52,26 @@ public class ThreePidMapping {
this.mxid = mxid;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
ThreePidMapping that = (ThreePidMapping) o;
if (medium != null ? !medium.equals(that.medium) : that.medium != null) return false;
return value != null ? value.equals(that.value) : that.value == null;
}
@Override
public int hashCode() {
int result = medium != null ? medium.hashCode() : 0;
result = 31 * result + (value != null ? value.hashCode() : 0);
return result;
}
@Override
public String toString() {
return JsonOutput.toJson(this);
}
}