CBLMutableArray
@protocol CBLMutableArray <CBLArray, CBLMutableArrayFragment>
CBLMutableArray protocol defines a set of methods for getting and setting array data.
-
Sets a CBLArray object at the given index. A nil value will be converted to an NSNull.
Declaration
Objective-C
- (void)setArray:(nullable CBLArray *)value atIndex:(NSUInteger)index;Parameters
valueThe CBLArray object.
indexThe index. This value must not exceed the bounds of the array.
-
Sets a CBLBlob object at the given index. A nil value will be converted to an NSNull.
Declaration
Objective-C
- (void)setBlob:(nullable CBLBlob *)value atIndex:(NSUInteger)index;Parameters
valueThe CBLBlob object.
indexThe index. This value must not exceed the bounds of the array.
-
Sets a boolean value at the given index.
Declaration
Objective-C
- (void)setBoolean:(BOOL)value atIndex:(NSUInteger)index;Parameters
valueThe boolean value.
indexThe index. This value must not exceed the bounds of the array.
-
Sets a Date object at the given index. A nil value will be converted to an NSNull.
Declaration
Objective-C
- (void)setDate:(nullable NSDate *)value atIndex:(NSUInteger)index;Parameters
valueThe Date object.
indexThe index. This value must not exceed the bounds of the array.
-
Sets a CBLDictionary object at the given index. A nil value will be converted to an NSNull.
Declaration
Objective-C
- (void)setDictionary:(nullable CBLDictionary *)value atIndex:(NSUInteger)index;Parameters
valueThe CBLDictionary object.
indexThe index. This value must not exceed the bounds of the array.
-
Sets a double value at the given index.
Declaration
Objective-C
- (void)setDouble:(double)value atIndex:(NSUInteger)index;Parameters
valueThe double value.
indexThe index. This value must not exceed the bounds of the array.
-
Sets a float value at the given index.
Declaration
Objective-C
- (void)setFloat:(float)value atIndex:(NSUInteger)index;Parameters
valueThe float value.
indexThe index. This value must not exceed the bounds of the array.
-
Sets an integer value at the given index.
Declaration
Objective-C
- (void)setInteger:(NSInteger)value atIndex:(NSUInteger)index;Parameters
valueThe integer value.
indexThe index. This value must not exceed the bounds of the array.
-
Sets a long long value at the given index.
Declaration
Objective-C
- (void)setLongLong:(long long)value atIndex:(NSUInteger)index;Parameters
valueThe long long value.
indexThe index. This value must not exceed the bounds of the array.
-
Sets an NSNumber object at the given index. A nil value will be converted to an NSNull.
Declaration
Objective-C
- (void)setNumber:(nullable NSNumber *)value atIndex:(NSUInteger)index;Parameters
valueThe NSNumber object.
indexThe index. This value must not exceed the bounds of the array.
-
Sets an object at the given index. A nil value will be converted to an NSNull.
Declaration
Objective-C
- (void)setObject:(nullable id)value atIndex:(NSUInteger)index;Parameters
valueThe object.
indexThe index. This value must not exceed the bounds of the array.
-
Sets an String object at the given index. A nil value will be converted to an NSNull.
Declaration
Objective-C
- (void)setString:(nullable NSString *)value atIndex:(NSUInteger)index;Parameters
valueThe String object.
indexThe index. This value must not exceed the bounds of the array.
-
Adds a CBLArray object to the end of the array. A nil value will be converted to an NSNull.
Declaration
Objective-C
- (void)addArray:(nullable CBLArray *)value;Parameters
valueThe CBLArray object.
-
Adds a CBLBlob object to the end of the array. A nil value will be converted to an NSNull.
Declaration
Objective-C
- (void)addBlob:(nullable CBLBlob *)value;Parameters
valueThe CBLMutableArray object.
-
Adds a boolean value to the end of the array.
Declaration
Objective-C
- (void)addBoolean:(BOOL)value;Parameters
valueThe boolean value.
-
Adds a Date object to the end of the array. A nil value will be converted to an NSNull.
Declaration
Objective-C
- (void)addDate:(nullable NSDate *)value;Parameters
valueThe Date object.
-
Adds a CBLDictionary object to the end of the array. A nil value will be converted to an NSNull.
Declaration
Objective-C
- (void)addDictionary:(nullable CBLDictionary *)value;Parameters
valueThe CBLDictionary object.
-
Adds a double value to the end of the array.
Declaration
Objective-C
- (void)addDouble:(double)value;Parameters
valueThe double value.
-
Adds a float value to the end of the array.
Declaration
Objective-C
- (void)addFloat:(float)value;Parameters
valueThe float value.
-
Adds an integer value to the end of the array.
Declaration
Objective-C
- (void)addInteger:(NSInteger)value;Parameters
valueThe integer value.
-
Adds a long long value to the end of the array.
Declaration
Objective-C
- (void)addLongLong:(long long)value;Parameters
valueThe long long value.
-
Adds an NSNumber object to the end of the array. A nil value will be converted to an NSNull.
Declaration
Objective-C
- (void)addNumber:(nullable NSNumber *)value;Parameters
valueThe NSNumber object.
-
Adds an object to the end of the array. A nil value will be converted to an NSNull.
Declaration
Objective-C
- (void)addObject:(nullable id)value;Parameters
valueThe object.
-
Adds a String object to the end of the array. A nil value will be converted to an NSNull.
Declaration
Objective-C
- (void)addString:(nullable NSString *)value;Parameters
valueThe String object.
-
Inserts a CBLArray object at the given index. A nil value will be converted to an NSNull.
Declaration
Objective-C
- (void)insertArray:(nullable CBLArray *)value atIndex:(NSUInteger)index;Parameters
valueThe CBLArray object.
indexThe index. This value must not exceed the bounds of the array.
-
Inserts a CBLBlob object at the given index. A nil value will be converted to an NSNull.
Declaration
Objective-C
- (void)insertBlob:(nullable CBLBlob *)value atIndex:(NSUInteger)index;Parameters
valueThe CBLBlob object.
indexThe index. This value must not exceed the bounds of the array.
-
Inserts a boolean value at the given index.
Declaration
Objective-C
- (void)insertBoolean:(BOOL)value atIndex:(NSUInteger)index;Parameters
valueThe boolean value.
indexThe index. This value must not exceed the bounds of the array.
-
Inserts a Date object at the given index. A nil value will be converted to an NSNull.
Declaration
Objective-C
- (void)insertDate:(nullable NSDate *)value atIndex:(NSUInteger)index;Parameters
valueThe Date object.
indexThe index. This value must not exceed the bounds of the array.
-
Inserts a CBLDictionary object at the given index. A nil value will be converted to an NSNull.
Declaration
Objective-C
- (void)insertDictionary:(nullable CBLDictionary *)value atIndex:(NSUInteger)index;Parameters
valueThe CBLDictionary object.
indexThe index. This value must not exceed the bounds of the array.
-
Inserts a double value at the given index.
Declaration
Objective-C
- (void)insertDouble:(double)value atIndex:(NSUInteger)index;Parameters
valueThe double value.
indexThe index. This value must not exceed the bounds of the array.
-
Inserts a float value at the given index.
Declaration
Objective-C
- (void)insertFloat:(float)value atIndex:(NSUInteger)index;Parameters
valueThe float value.
indexThe index. This value must not exceed the bounds of the array.
-
Inserts an integer value at the given index.
Declaration
Objective-C
- (void)insertInteger:(NSInteger)value atIndex:(NSUInteger)index;Parameters
valueThe integer value.
indexThe index. This value must not exceed the bounds of the array.
-
Inserts a long long value at the given index.
Declaration
Objective-C
- (void)insertLongLong:(long long)value atIndex:(NSUInteger)index;Parameters
valueThe long long value.
indexThe index. This value must not exceed the bounds of the array.
-
Inserts an NSNumber object at the given index. A nil value will be converted to an NSNull.
Declaration
Objective-C
- (void)insertNumber:(nullable NSNumber *)value atIndex:(NSUInteger)index;Parameters
valueThe NSNumber object.
indexThe index. This value must not exceed the bounds of the array.
-
Inserts an object at the given index. A nil value will be converted to an NSNull. an NSNull object.
Declaration
Objective-C
- (void)insertObject:(nullable id)object atIndex:(NSUInteger)index;Parameters
objectThe object.
indexThe index. This value must not exceed the bounds of the array.
-
Inserts an String object at the given index. A nil value will be converted to an NSNull.
Declaration
Objective-C
- (void)insertString:(nullable NSString *)value atIndex:(NSUInteger)index;Parameters
valueThe String object.
indexThe index. This value must not exceed the bounds of the array.
-
Set an array as a content. Allowed value types are NSArray, NSDate, NSDictionary, NSNumber, NSNull, NSString, CBLMutableArray, CBLBlob, CBLMutableDictionary. The NSArrays and NSDictionaries must contain only the above types. Setting the new array content will replace the current data including the existing CBLMutableArray and CBLMutableDictionary objects.
Declaration
Objective-C
- (void)setArray:(nullable NSArray *)array;Parameters
arrayThe array.
-
Removes the object at the given index.
Declaration
Objective-C
- (void)removeObjectAtIndex:(NSUInteger)index;Parameters
indexThe index. This value must not exceed the bounds of the array.
-
Gets a CBLMutableArray at the given index. Returns nil if the value is not an array.
Declaration
Objective-C
- (nullable CBLMutableArray *)arrayAtIndex:(NSUInteger)index;Parameters
indexThe index. This value must not exceed the bounds of the array.
Return Value
The CBLMutableArray object.
-
Gets a CBLMutableDictionary at the given index. Returns nil if the value is not a dictionary.
Declaration
Objective-C
- (nullable CBLMutableDictionary *)dictionaryAtIndex:(NSUInteger)index;Parameters
indexThe index. This value must not exceed the bounds of the array.
Return Value
The CBLMutableDictionary object.
-
Subscripting access to a CBLMutableFragment object that represents the value at the given index.
Declaration
Objective-C
- (nullable CBLMutableFragment *)objectAtIndexedSubscript:(NSUInteger)index;Parameters
indexThe index. If the index value exceeds the bounds of the array, the CBLMutableFragment will represent a nil value.
Return Value
The CBLMutableFragment object.
CBLMutableArray Protocol Reference