CBLMutableArray
@protocol CBLMutableArray <CBLArray, CBLMutableArrayFragment>
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
value
The value.
index
The 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
value
The String object.
index
The 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
value
The NSNumber object.
index
The 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
value
The integer value.
index
The 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
value
The long long value.
index
The 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
value
The float value.
index
The 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
value
The double value.
index
The 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
value
The boolean value.
index
The 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
value
The Date object.
index
The 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
value
The CBLBlob object.
index
The 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
value
The CBLArray object.
index
The 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
value
The CBLDictionary object.
index
The 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
value
The 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
value
The 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
value
The NSNumber object.
-
Adds an integer value to the end of the array.
Declaration
Objective-C
- (void)addInteger:(NSInteger)value;
Parameters
value
The integer value.
-
Adds a long long value to the end of the array.
Declaration
Objective-C
- (void)addLongLong:(long long)value;
Parameters
value
The long long value.
-
Adds a float value to the end of the array.
Declaration
Objective-C
- (void)addFloat:(float)value;
Parameters
value
The float value.
-
Adds a double value to the end of the array.
Declaration
Objective-C
- (void)addDouble:(double)value;
Parameters
value
The double value.
-
Adds a boolean value to the end of the array.
Declaration
Objective-C
- (void)addBoolean:(BOOL)value;
Parameters
value
The 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
value
The 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
value
The 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
value
The 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
value
The 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
value
The value.
index
The 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
value
The String object.
index
The 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
value
The NSNumber object.
index
The 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
value
The integer value.
index
The 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
value
The long long value.
index
The 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
value
The float value.
index
The 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
value
The double value.
index
The 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
value
The boolean value.
index
The 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
value
The Date object.
index
The 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
value
The CBLBlob object.
index
The 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
value
The CBLDictionary object.
index
The 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
value
The CBLArray object.
index
The 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
index
The 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
index
The 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
index
The 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:(nullable NSArray *)data;
Parameters
data
The data.
-
Subscripting access to a CBLMutableFragment object that represents the value at the given index.
Declaration
Objective-C
- (nullable CBLMutableFragment *)objectAtIndexedSubscript:(NSUInteger)index;
Parameters
index
The index. If the index value exceeds the bounds of the array, the CBLMutableFragment will represent a nil value.
Return Value
The CBLMutableFragment object.