CBLArray

@protocol CBLArray <CBLReadOnlyArray, CBLArrayFragment>

CBLArray 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

    value

    The CBLArray 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 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 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.

  • 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 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 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 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 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

    value

    The object.

    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.

  • 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 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 CBLArray object.

  • 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 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.

  • Adds a double value to the end of the array.

    Declaration

    Objective-C

    - (void)addDouble:(double)value;

    Parameters

    value

    The double value.

  • Adds a float value to the end of the array.

    Declaration

    Objective-C

    - (void)addFloat:(float)value;

    Parameters

    value

    The float value.

  • 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 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 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

    value

    The 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

    value

    The 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

    value

    The CBLArray 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 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 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 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 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 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 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 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

    object

    The object.

    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.

  • Set an array as a content. Allowed value types are NSArray, NSDate, NSDictionary, NSNumber, NSNull, NSString, CBLArray, CBLBlob, CBLDictionary. The NSArrays and NSDictionaries must contain only the above types. Setting the new array content will replace the current data including the existing CBLArray and CBLDictionary objects.

    Declaration

    Objective-C

    - (void)setArray:(nullable NSArray *)array;

    Parameters

    array

    The array.

  • Removes the object at the given index.

    Declaration

    Objective-C

    - (void)removeObjectAtIndex:(NSUInteger)index;

    Parameters

    index

    The index. This value must not exceed the bounds of the array.

  • Gets a CBLArray at the given index. Returns nil if the value is not an array.

    Declaration

    Objective-C

    - (nullable CBLArray *)arrayAtIndex:(NSUInteger)index;

    Parameters

    index

    The index. This value must not exceed the bounds of the array.

    Return Value

    The CBLArray object.

  • Gets a CBLDictionary at the given index. Returns nil if the value is not a dictionary.

    Declaration

    Objective-C

    - (nullable CBLDictionary *)dictionaryAtIndex:(NSUInteger)index;

    Parameters

    index

    The index. This value must not exceed the bounds of the array.

    Return Value

    The CBLDictionary object.

  • Subscripting access to a CBLFragment object that represents the value at the given index.

    Declaration

    Objective-C

    - (nonnull CBLFragment *)objectAtIndexedSubscript:(NSUInteger)index;

    Parameters

    index

    The index. If the index value exceeds the bounds of the array, the CBLFragment will represent a nil value.

    Return Value

    The CBLFragment object.