WZDataMap

Superclass:
Declared In:

Introduction

The WZDataMap class provides an interface encapsulating a map (or dictionary) of items that represent server metadata that is 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*, WZDataItem*> *)dictionary; 
Parameters
dictionary

the dictionary of WZDataItems that the caller wishes to initialize the WZDataMap with.

Return Value

An instance of WZDataMap

Discussion

Creates a new WZDataMap and copies the items in dictionary to it's internal data map


init


- (nonnull instancetype) init; 
Return Value

An instance of WZDataMap

Discussion

Initialize a new WZDataMap with no items


initWithDictionary:


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

the dictionary of WZDataItems that the caller wishes to initialize the WZDataMap with.

Return Value

An instance of WZDataMap

Discussion

Initialize a new WZDataMap and copies the items in dictionary to it's internal data map


remove:


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

the key value to be removed

Discussion

Remove an item from the internal map


setBool:forKey:


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

the bool value to add

key

the unique key for the new bool value

Discussion

Add a bool (which will be converted to a WZDataItem) with given 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

Add a date (which will be converted to a WZDataItem) with given 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

Add a double (which will be converted to a WZDataItem) with given 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

Add a float (which will be converted to a WZDataItem) with given 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

Add a integer (which will be converted to a WZDataItem) with given key to the internal map


setItem:forKey:


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

the WZDataItem value to add

key

the unique key for the new WZDataItem value

Discussion

Add a WZDataItem with given key to the internal map


setList:forKey:


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

the WZDataList value to add

key

the unique key for the new WZDataList value

Discussion

Add a WZDataList with given key to the internal map


setMap:forKey:


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

the WZDataMap value to add

key

the unique key for the new WZDataMap value

Discussion

Add a WZDataMap with given 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

Add a string (which will be converted to a WZDataItem) with given key to the internal map


Properties

data

data


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

The underlying NSMutableDictionary that stores the items in the map.