From bde743ed25166a0b320ae157bfb1d68064f531c9 Mon Sep 17 00:00:00 2001 From: Gil Date: Tue, 3 Oct 2017 08:55:22 -0700 Subject: Release 4.3.0 (#327) Initial release of Firestore at 0.8.0 Bump FirebaseCommunity to 0.1.3 --- .../third_party/Immutable/FSTImmutableSortedSet.h | 47 ++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 Firestore/third_party/Immutable/FSTImmutableSortedSet.h (limited to 'Firestore/third_party/Immutable/FSTImmutableSortedSet.h') diff --git a/Firestore/third_party/Immutable/FSTImmutableSortedSet.h b/Firestore/third_party/Immutable/FSTImmutableSortedSet.h new file mode 100644 index 0000000..d0f9906 --- /dev/null +++ b/Firestore/third_party/Immutable/FSTImmutableSortedSet.h @@ -0,0 +1,47 @@ +#import + +NS_ASSUME_NONNULL_BEGIN + +/** + * FSTImmutableSortedSet is a set. It is immutable, but has methods to create new sets that are + * mutations of it, in an efficient way. + */ +@interface FSTImmutableSortedSet : NSObject + ++ (FSTImmutableSortedSet *)setWithComparator:(NSComparator)comparator; + ++ (FSTImmutableSortedSet *)setWithKeysFromDictionary:(NSDictionary *)array + comparator:(NSComparator)comparator; + +- (BOOL)containsObject:(KeyType)object; + +- (FSTImmutableSortedSet *)setByAddingObject:(KeyType)object; +- (FSTImmutableSortedSet *)setByRemovingObject:(KeyType)object; + +- (KeyType)firstObject; +- (KeyType)lastObject; +- (NSUInteger)count; +- (BOOL)isEmpty; + +- (KeyType)predecessorObject:(KeyType)entry; + +/** + * Returns the index of the object or NSNotFound if the object is not found. + * + * @param object The object to return the index for. + * @return The index of the object, or NSNotFound if not found. + */ +- (NSUInteger)indexOfObject:(KeyType)object; + +- (void)enumerateObjectsUsingBlock:(void (^)(KeyType obj, BOOL *stop))block; +- (void)enumerateObjectsFrom:(KeyType)start + to:(_Nullable KeyType)end + usingBlock:(void (^)(KeyType obj, BOOL *stop))block; +- (void)enumerateObjectsReverse:(BOOL)reverse usingBlock:(void (^)(KeyType obj, BOOL *stop))block; + +- (NSEnumerator *)objectEnumerator; +- (NSEnumerator *)objectEnumeratorFrom:(KeyType)startKey; + +@end + +NS_ASSUME_NONNULL_END -- cgit v1.2.3