what-the-bank/sources/com/google/firebase/firestore/remote/TargetChange.java

68 lines
2.6 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.google.firebase.firestore.remote;
import com.google.firebase.database.collection.ImmutableSortedSet;
import com.google.firebase.firestore.model.DocumentKey;
import o.QwV;
/* loaded from: classes2.dex */
public final class TargetChange {
private final ImmutableSortedSet<DocumentKey> addedDocuments;
private final boolean current;
private final ImmutableSortedSet<DocumentKey> modifiedDocuments;
private final ImmutableSortedSet<DocumentKey> removedDocuments;
private final QwV resumeToken;
public static TargetChange createSynthesizedTargetChangeForCurrentChange(boolean z) {
return new TargetChange(QwV.a, z, DocumentKey.emptyKeySet(), DocumentKey.emptyKeySet(), DocumentKey.emptyKeySet());
}
public TargetChange(QwV qwV, boolean z, ImmutableSortedSet<DocumentKey> immutableSortedSet, ImmutableSortedSet<DocumentKey> immutableSortedSet2, ImmutableSortedSet<DocumentKey> immutableSortedSet3) {
this.resumeToken = qwV;
this.current = z;
this.addedDocuments = immutableSortedSet;
this.modifiedDocuments = immutableSortedSet2;
this.removedDocuments = immutableSortedSet3;
}
public final boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null || getClass() != obj.getClass()) {
return false;
}
TargetChange targetChange = (TargetChange) obj;
if (this.current == targetChange.current && this.resumeToken.equals(targetChange.resumeToken) && this.addedDocuments.equals(targetChange.addedDocuments) && this.modifiedDocuments.equals(targetChange.modifiedDocuments)) {
return this.removedDocuments.equals(targetChange.removedDocuments);
}
return false;
}
public final int hashCode() {
int hashCode = this.resumeToken.hashCode();
boolean z = this.current;
int hashCode2 = this.addedDocuments.hashCode();
return (((((((hashCode * 31) + (z ? 1 : 0)) * 31) + hashCode2) * 31) + this.modifiedDocuments.hashCode()) * 31) + this.removedDocuments.hashCode();
}
public final boolean isCurrent() {
return this.current;
}
public final QwV getResumeToken() {
return this.resumeToken;
}
public final ImmutableSortedSet<DocumentKey> getRemovedDocuments() {
return this.removedDocuments;
}
public final ImmutableSortedSet<DocumentKey> getModifiedDocuments() {
return this.modifiedDocuments;
}
public final ImmutableSortedSet<DocumentKey> getAddedDocuments() {
return this.addedDocuments;
}
}