FSTLLRBValueNode.h 1.0 KB

1234567891011121314151617181920212223242526272829
  1. #import <Foundation/Foundation.h>
  2. #import "Firestore/third_party/Immutable/FSTLLRBNode.h"
  3. NS_ASSUME_NONNULL_BEGIN
  4. @interface FSTLLRBValueNode : NSObject <FSTLLRBNode>
  5. - (id)init __attribute__((
  6. unavailable("Use initWithKey:withValue:withColor:withLeft:withRight: instead.")));
  7. - (instancetype)initWithKey:(nullable id)key
  8. withValue:(nullable id)value
  9. withColor:(FSTLLRBColor)color
  10. withLeft:(nullable id<FSTLLRBNode>)left
  11. withRight:(nullable id<FSTLLRBNode>)right NS_DESIGNATED_INITIALIZER;
  12. @property(nonatomic, assign, readonly) FSTLLRBColor color;
  13. @property(nonatomic, strong, readonly, nullable) id key;
  14. @property(nonatomic, strong, readonly, nullable) id value;
  15. @property(nonatomic, strong, readonly, nullable) id<FSTLLRBNode> right;
  16. // This property cannot be readonly, because it is set when building the tree.
  17. // TODO(klimt): Find a way to build the tree without mutating this.
  18. @property(nonatomic, strong, nullable) id<FSTLLRBNode> left;
  19. @end
  20. NS_ASSUME_NONNULL_END