DITRegister
@interface DITRegister : NSObject
Represents a CRDT register that can be upserted as part of a document or assigned to a property during an update of a document.
-
The value in the register.
Declaration
Objective-C
@property (nonatomic, readonly) id _Nonnull value; -
Unavailable
Undocumented
Declaration
Objective-C
- (instancetype)init NS_UNAVAILABLE; -
Initializes a new register with the provided value that can be used as part of a document’s content.
Declaration
Objective-C
- (nonnull instancetype)initWithValue:(nonnull id)value; -
Returns
YESif passed in register has the same value, otherwise returnsNO.Declaration
Objective-C
- (BOOL)isEqualToRegister:(nonnull DITRegister *)ditRegister; -
Returns the register’s value as an
NSStringif possible, otherwise the return value will benil.Declaration
Objective-C
@property (nonatomic, readonly, nullable) NSString *string; -
Returns the register’s value as an
NSString. If the key was invalid the return value will be an empty string.Declaration
Objective-C
@property (nonatomic, readonly) NSString *_Nonnull stringValue; -
Returns the register’s value as a
BOOL. If the key was invalid the return value will befalse.Declaration
Objective-C
@property (nonatomic, readonly) BOOL booleanValue; -
Returns the register’s value as an
NSIntegerif possible, otherwise the return value will be 0.Declaration
Objective-C
@property (nonatomic, readonly) NSInteger integerValue; -
Returns the register’s value as an
NSNumberif possible, otherwise the return value will benil.Declaration
Objective-C
@property (nonatomic, readonly, nullable) NSNumber *number; -
Returns the register’s value as an
NSNumber. If the key was invalid the return value will be anNSNumberwith a value of 0.Declaration
Objective-C
@property (nonatomic, readonly) NSNumber *_Nonnull numberValue; -
Returns the register’s value as an
NSArrayif possible, otherwise the return value will benil.Declaration
Objective-C
@property (nonatomic, readonly, nullable) NSArray *array; -
Returns the register’s value as an
NSArray. If the key was invalid the return value will be an empty array.Declaration
Objective-C
@property (nonatomic, readonly) NSArray *_Nonnull arrayValue; -
Returns the register’s value as an
NSDictionaryif possible, otherwise the return value will benil.Declaration
Objective-C
@property (nonatomic, readonly, nullable) NSDictionary<NSString *, id> *dictionary; -
Returns the register’s value as an
NSDictionary. If the key was invalid the return value will be an empty dictionary.Declaration
Objective-C
@property (nonatomic, readonly) NSDictionary<NSString *, id> *_Nonnull dictionaryValue;
DITRegister Class Reference