SBDMessageMetaArray Class Reference

Inherits from NSObject
Conforms to NSCopying
SBDMappable
Declared in SBDMessageMetaArray.h

Overview

The SBDMessageMetaArray instance has a string type of key and an array type of value. The value consists of a string. It usually can be used for ‘vote’ or ‘reaction’ for the message.

  key

A string type of key.

@property (copy, atomic, readonly, nonnull) NSString *key

Availability

3.0.148

Declared In

SBDMessageMetaArray.h

  value

The value consists of a string. The value guarantees de-duplicated string.

@property (strong, atomic, readonly, nonnull) NSArray<NSString*> *value

Availability

3.0.148

Declared In

SBDMessageMetaArray.h

– initWithKey:

Initializes an message meta array with the given key and an empty array of the value.

- (nonnull instancetype)initWithKey:(nonnull NSString *)key

Parameters

key

A string type of key.

Return Value

Message meta array instance.

Availability

3.0.148

@code SBDMessageMetaArray *metaArray = [[SBDMessageMetaArray alloc] initWithKey:string_key]; @endcode

Declared In

SBDMessageMetaArray.h

– initWithKey:value:

Initializes an message meta array with the given key and the given value.

- (nonnull instancetype)initWithKey:(nonnull NSString *)key value:(nullable NSArray<NSString*> *)value

Parameters

key

A string type of key.

value

The value consists of a string.

Return Value

Message meta array instance.

Availability

3.0.148

@code SBDMessageMetaArray *metaArray = [[SBDMessageMetaArray alloc] initWithKey:string_key value:array_value]; @endcode

Declared In

SBDMessageMetaArray.h

– init

DO NOT USE this initializer. Use initWithKey:value: instead.

- (nonnull instancetype)init

Declared In

SBDMessageMetaArray.h

– addValue:

Adds an set type of the value to the receiver’s value field.

- (void)addValue:(nonnull NSSet<NSString*> *)value

Parameters

value

The value consists of a string.

Availability

3.0.148

@code [metaArray addValue:set_value]; @endcode

Declared In

SBDMessageMetaArray.h

– addValueWithArray:

Adds an array type of the value to the receiver’s value field.

- (void)addValueWithArray:(nonnull NSArray<NSString*> *)array

Parameters

array

The array consists of a string.

Availability

3.0.148

@code [metaArray addValueWithArray:array_value]; @endcode

Declared In

SBDMessageMetaArray.h

– removeValue:

Removes an set type of the value from the receiver’s value field.

- (void)removeValue:(nonnull NSSet<NSString*> *)value

Parameters

value

The value consists of a string.

Availability

3.0.148

@code [metaArray removeValue:set_value]; @endcode

Discussion

Nonexistent string value are not ignored.

Declared In

SBDMessageMetaArray.h

– removeValueWithArray:

Removes an array type of the value from the receiver’s value field.

- (void)removeValueWithArray:(nonnull NSArray<NSString*> *)array

Parameters

array

The value consists of a string.

Availability

3.0.148

@code [metaArray removeValueWithArray:array_value]; @endcode

Discussion

Nonexistent string value are not ignored.

Declared In

SBDMessageMetaArray.h