CBLMutableArray
@protocol CBLMutableArray <CBLArray>
CBLMutableArray protocol defines a set of methods for getting and setting array data.
-
Sets a value at the given index. A nil value will be converted to an NSNull.
Declaration
Objective-C
- (void)setValue:(nullable id)value atIndex:(NSUInteger)index;Parameters
valueThe value.
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.
-
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 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 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 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 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 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 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 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.
-
Adds a value to the end of the array. A nil value will be converted to an NSNull.
Declaration
Objective-C
- (void)addValue:(nullable id)value;Parameters
valueThe value.
-
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.
-
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 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 a float value to the end of the array.
Declaration
Objective-C
- (void)addFloat:(float)value;Parameters
valueThe float value.
-
Adds a double value to the end of the array.
Declaration
Objective-C
- (void)addDouble:(double)value;Parameters
valueThe double value.
-
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 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 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 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.
-
Inserts a value at the given index. A nil value will be converted to an NSNull. an NSNull object.
Declaration
Objective-C
- (void)insertValue:(nullable id)value atIndex:(NSUInteger)index;Parameters
valueThe value.
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.
-
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 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 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 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 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 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 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 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.
-
Removes the object at the given index.
Declaration
Objective-C
- (void)removeValueAtIndex:(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.
-
Set data for the array. Allowed value types are CBLArray, CBLBlob, CBLDictionary, NSArray, NSDate, NSDictionary, NSNumber, NSNull, and NSString. The NSArrays and NSDictionaries must contain only the above types.
Declaration
Objective-C
- (void)setData:(nonnull NSArray *)data;Parameters
dataThe data.
-
Subscripting access to a CBLMutableFragment object that represents the value at the given index.
Declaration
Objective-C
- (id)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