mirror of
https://github.com/signalapp/Signal-Server
synced 2026-04-26 05:18:06 +01:00
Rework messages API to fail if you miss some deviceIds per number
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
package org.whispersystems.textsecuregcm.util;
|
||||
|
||||
import static com.google.common.base.Objects.equal;
|
||||
|
||||
public class Pair<T1, T2> {
|
||||
private final T1 v1;
|
||||
private final T2 v2;
|
||||
|
||||
Pair(T1 v1, T2 v2) {
|
||||
public Pair(T1 v1, T2 v2) {
|
||||
this.v1 = v1;
|
||||
this.v2 = v2;
|
||||
}
|
||||
@@ -16,4 +18,14 @@ public class Pair<T1, T2> {
|
||||
public T2 second(){
|
||||
return v2;
|
||||
}
|
||||
|
||||
public boolean equals(Object o) {
|
||||
return o instanceof Pair &&
|
||||
equal(((Pair) o).first(), first()) &&
|
||||
equal(((Pair) o).second(), second());
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
return first().hashCode() ^ second().hashCode();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user