WOWZDataMap

Superclass:
Declared In:

Introduction

The WOWZDataMap class provides an interface for a map or dictionary of items that represent server metadata that's sent and received by GoCoder.



Methods

+dataMapWithDictionary:
-init
-initWithDictionary:
-remove:
-setBool:forKey:
-setDate:forKey:
-setDouble:forKey:
-setFloat:forKey:
-setInteger:forKey:
-setItem:forKey:
-setList:forKey:
-setMap:forKey:
-setString:forKey:

dataMapWithDictionary:


+ (nonnull instancetype) dataMapWithDictionary:(nonnull NSDictionary<NSString*, WOWZDataItem*> *)dictionary; 
Parameters
dictionary

The dictionary of WOWZDataItems that the caller should use to initialize the WOWZDataMap.

Return Value

An instance of WOWZDataMap.

Discussion

Creates a WOWZDataMap that copies the items in the specified dictionary to its internal data map.


init


- (nonnull instancetype) init; 
Return Value

An instance of an empty WOWZDataMap.

Discussion

Initializes an empty WOWZDataMap.


initWithDictionary:


- (nonnull instancetype) initWithDictionary:(nonnull NSDictionary<NSString*, WOWZDataItem*> *)dictionary; 
Parameters
dictionary

The dictionary of WOWZDataItems that the caller should use to initialize the WOWZDataMap.

Return Value

An instance of WOWZDataMap.

Discussion

Initializes a WOWZDataMap that copies the items in the specified dictionary to its internal data map.


remove:


- (void) remove:(nonnull NSString *)key; 
Parameters
key

The key value to remove.

Discussion

Removes an item from the internal map.


setBool:forKey:


- (void) setBool:(BOOL)value forKey:(nonnull NSString *)key; 
Parameters
value

The Boolean value to add.

key

The unique key for the new Boolean value.

Discussion

Adds a Boolean, which will be converted to a WOWZDataItem, with the specified key to the internal map.


setDate:forKey:


- (void) setDate:(nullable NSDate *)value forKey:(nonnull NSString *)key; 
Parameters
value

The date value to add.

key

The unique key for the new date value.

Discussion

Adds a date, which will be converted to a WOWZDataItem, with the specified key to the internal map.


setDouble:forKey:


- (void) setDouble:(double)value forKey:(nonnull NSString *)key; 
Parameters
value

The double value to add.

key

The unique key for the new double value.

Discussion

Adds a double, which will be converted to a WOWZDataItem, with the specified key to the internal map.


setFloat:forKey:


- (void) setFloat:(float)value forKey:(nonnull NSString *)key; 
Parameters
value

The float value to add.

key

The unique key for the new float value.

Discussion

Adds a float, which will be converted to a WOWZDataItem, with the specified key to the internal map.


setInteger:forKey:


- (void) setInteger:(NSInteger)value forKey:(nonnull NSString *)key; 
Parameters
value

The integer value to add.

key

The unique key for the new integer value.

Discussion

Adds an integer, which will be converted to a WOWZDataItem, with the specified key to the internal map.


setItem:forKey:


- (void) setItem:(nullable WOWZDataItem *)value forKey:(nonnull NSString *)key; 
Parameters
value

The WOWZDataItem value to add.

key

The unique key for the new WOWZDataItem value.

Discussion

Adds a WOWZDataItem with the specified key to the internal map.


setList:forKey:


- (void) setList:(nullable WOWZDataList *)value forKey:(nonnull NSString *)key; 
Parameters
value

The WOWZDataList value to add.

key

The unique key for the new WOWZDataList value.

Discussion

Adds a WOWZDataList with the specified key to the internal map.


setMap:forKey:


- (void) setMap:(nullable WOWZDataMap *)value forKey:(nonnull NSString *)key; 
Parameters
value

The WOWZDataMap value to add.

key

The unique key for the new WOWZDataMap value.

Discussion

Adds a WOWZDataMap with the specified key to the internal map.


setString:forKey:


- (void) setString:(nullable NSString *)value forKey:(nonnull NSString *)key; 
Parameters
value

The string value to add.

key

The unique key for the new string value.

Discussion

Adds a string, which will be converted to a WOWZDataItem, with the specified key to the internal map.


Properties

data

data


@property (nonatomic,
    strong,
    readonly,
    nullable) NSMutableDictionary<NSString*, WOWZDataItem*> *data; 
Discussion

The underlying NSMutableDictionary that stores the items in the map.