package com.google.firebase.firestore.local; import com.google.firebase.database.collection.ImmutableSortedMap; import com.google.firebase.firestore.model.Document; import com.google.firebase.firestore.model.DocumentCollections; import com.google.firebase.firestore.model.DocumentKey; import java.util.Map; /* loaded from: classes2.dex */ public final class LocalDocumentsResult { private final int batchId; private final ImmutableSortedMap documents; LocalDocumentsResult(int i, ImmutableSortedMap immutableSortedMap) { this.batchId = i; this.documents = immutableSortedMap; } public static LocalDocumentsResult fromOverlayedDocuments(int i, Map map) { ImmutableSortedMap emptyDocumentMap = DocumentCollections.emptyDocumentMap(); for (Map.Entry entry : map.entrySet()) { emptyDocumentMap = emptyDocumentMap.insert(entry.getKey(), entry.getValue().getDocument()); } return new LocalDocumentsResult(i, emptyDocumentMap); } public final ImmutableSortedMap getDocuments() { return this.documents; } public final int getBatchId() { return this.batchId; } }