WZDataItem

Conforms to:
NSMutableCopying, NSCopying, NSCoding
Superclass:
NSObject
Declared In:

Introduction

The WZDataItem class provides an interface encapsulating the various data items that represent server metadata that is sent and received by GoCoder.



Methods

-boolValue
-dateValue
-doubleValue
-floatValue
-init
-integerValue
+itemWithBool:
+itemWithDate:
+itemWithDouble:
+itemWithFloat:
+itemWithInteger:
+itemWithString:
-listValue
-mapValue
-stringValue

boolValue


- (BOOL) boolValue; 
Return Value

the bool value of the WZDataItem, or 0 if the item is not of type WZDataTypeBoolean

Discussion

Get the bool value of the WZDataItem


dateValue


- (nullable NSDate *)dateValue; 
Return Value

the date value of the WZDataItem, or nil if the item is not of type WZDataTypeDate

Discussion

Get the date value of the WZDataItem


doubleValue


- (double) doubleValue; 
Return Value

the double value of the WZDataItem, or 0 if the item is not of type WZDataTypeDouble

Discussion

Get the double value of the WZDataItem


floatValue


- (float) floatValue; 
Return Value

the float value of the WZDataItem, or 0 if the item is not of type WZDataTypeFloat

Discussion

Get the float value of the WZDataItem


init


- (nonnull instancetype) init; 
Return Value

An instance of WZDataItem of type WZDataTypeNull

Discussion

Initialize a WZDataItem


integerValue


- (NSInteger) integerValue; 
Return Value

the integer value of the WZDataItem, or 0 if the item is not of type WZDataTypeInteger

Discussion

Get the integer value of the WZDataItem


itemWithBool:


+ (nonnull instancetype) itemWithBool:(BOOL)value; 
Parameters
value

the bool value with which to initialize the item

Return Value

An instance of WZDataItem

Discussion

Creates a new WZDataItem of type WZDataTypeBool


itemWithDate:


+ (nonnull instancetype) itemWithDate:(nonnull NSDate *)value; 
Parameters
value

the date value with which to initialize the item

Return Value

An instance of WZDataItem

Discussion

Creates a new WZDataItem of type WZDataTypeDate


itemWithDouble:


+ (nonnull instancetype) itemWithDouble:(double)value; 
Parameters
value

the double value with which to initialize the item

Return Value

An instance of WZDataItem

Discussion

Creates a new WZDataItem of type WZDataTypeDouble


itemWithFloat:


+ (nonnull instancetype) itemWithFloat:(float)value; 
Parameters
value

the float value with which to initialize the item

Return Value

An instance of WZDataItem

Discussion

Creates a new WZDataItem of type WZDataTypeFloat


itemWithInteger:


+ (nonnull instancetype) itemWithInteger:(NSInteger)value; 
Parameters
value

the integer value with which to initialize the item

Return Value

An instance of WZDataItem

Discussion

Creates a new WZDataItem of type WZDataTypeInteger


itemWithString:


+ (nonnull instancetype) itemWithString:(nonnull NSString *)value; 
Parameters
value

the string value with which to initialize the item

Return Value

An instance of WZDataItem

Discussion

Creates a new WZDataItem of type WZDataTypeString


listValue


- (nullable WZDataList *)listValue; 
Return Value

the list value of the WZDataItem, or nil if the item is not of type WZDataTypeList

Discussion

Get the list value of the WZDataItem


mapValue


- (nullable WZDataMap *)mapValue; 
Return Value

the map value of the WZDataItem, or nil if the item is not of type WZDataTypeMap

Discussion

Get the map value of the WZDataItem


stringValue


- (nullable NSString *)stringValue; 
Return Value

the string value of the WZDataItem, or nil if the item is not of type WZDataTypeString

Discussion

Get the string value of the WZDataItem


Properties

type

type


@property (nonatomic,
    assign,
    readonly) WZDataType type; 
Discussion

The type of this data item.