From 515625c47fab947f82d7f8fc8daef885e56a7df6 Mon Sep 17 00:00:00 2001 From: Gil Date: Thu, 1 Feb 2018 07:55:49 -0800 Subject: Remove predecessorKey,Object,Document, etc (#735) This is dead code. I think it was probably useful in the RTDB because of the way it notified of changes, but we give changes with indexes in Firestore so I think we don't need it. --- Firestore/Source/Model/FSTDocumentSet.h | 10 ---------- Firestore/Source/Model/FSTDocumentSet.mm | 10 ---------- 2 files changed, 20 deletions(-) (limited to 'Firestore/Source/Model') diff --git a/Firestore/Source/Model/FSTDocumentSet.h b/Firestore/Source/Model/FSTDocumentSet.h index a7f8c4a..022e900 100644 --- a/Firestore/Source/Model/FSTDocumentSet.h +++ b/Firestore/Source/Model/FSTDocumentSet.h @@ -58,16 +58,6 @@ NS_ASSUME_NONNULL_BEGIN */ - (FSTDocument *_Nullable)lastDocument; -/** - * Returns the document previous to the document associated with the given key in the set according - * to its built in ordering. Returns nil if the document associated with the given key is the - * first document. - * - * @param key A key that must be present in the DocumentSet. - * @throws NSInvalidArgumentException if key is not present. - */ -- (FSTDocument *_Nullable)predecessorDocumentForKey:(FSTDocumentKey *)key; - /** * Returns the index of the document with the provided key in the document set. Returns NSNotFound * if the key is not present. diff --git a/Firestore/Source/Model/FSTDocumentSet.mm b/Firestore/Source/Model/FSTDocumentSet.mm index c4c0f49..6f44799 100644 --- a/Firestore/Source/Model/FSTDocumentSet.mm +++ b/Firestore/Source/Model/FSTDocumentSet.mm @@ -135,16 +135,6 @@ typedef FSTImmutableSortedSet SetType; return [self.sortedSet lastObject]; } -- (FSTDocument *_Nullable)predecessorDocumentForKey:(FSTDocumentKey *)key { - FSTDocument *doc = [self.index objectForKey:key]; - if (!doc) { - @throw [NSException exceptionWithName:NSInvalidArgumentException - reason:[NSString stringWithFormat:@"Key %@ does not exist", key] - userInfo:nil]; - } - return [self.sortedSet predecessorObject:doc]; -} - - (NSUInteger)indexOfKey:(FSTDocumentKey *)key { FSTDocument *doc = [self.index objectForKey:key]; return doc ? [self.sortedSet indexOfObject:doc] : NSNotFound; -- cgit v1.2.3