WZDataItem
IntroductionThe WZDataItem class provides an interface encapsulating the various data items that represent server metadata that is sent and received by GoCoder. Methods
boolValue- (BOOL) boolValue; Return Valuethe bool value of the WZDataItem, or 0 if the item is not of type WZDataTypeBoolean DiscussionGet the bool value of the WZDataItem dateValue- (nullable NSDate *)dateValue; Return Valuethe date value of the WZDataItem, or nil if the item is not of type WZDataTypeDate DiscussionGet the date value of the WZDataItem doubleValue- (double) doubleValue; Return Valuethe double value of the WZDataItem, or 0 if the item is not of type WZDataTypeDouble DiscussionGet the double value of the WZDataItem floatValue- (float) floatValue; Return Valuethe float value of the WZDataItem, or 0 if the item is not of type WZDataTypeFloat DiscussionGet the float value of the WZDataItem init- (nonnull instancetype) init; Return ValueAn instance of WZDataItem of type WZDataTypeNull DiscussionInitialize a WZDataItem integerValue- (NSInteger) integerValue; Return Valuethe integer value of the WZDataItem, or 0 if the item is not of type WZDataTypeInteger DiscussionGet the integer value of the WZDataItem itemWithBool:+ (nonnull instancetype) itemWithBool:(BOOL)value; ParametersReturn ValueAn instance of WZDataItem DiscussionCreates a new WZDataItem of type WZDataTypeBool itemWithDate:+ (nonnull instancetype) itemWithDate:(nonnull NSDate *)value; ParametersReturn ValueAn instance of WZDataItem DiscussionCreates a new WZDataItem of type WZDataTypeDate itemWithDouble:+ (nonnull instancetype) itemWithDouble:(double)value; ParametersReturn ValueAn instance of WZDataItem DiscussionCreates a new WZDataItem of type WZDataTypeDouble itemWithFloat:+ (nonnull instancetype) itemWithFloat:(float)value; ParametersReturn ValueAn instance of WZDataItem DiscussionCreates a new WZDataItem of type WZDataTypeFloat itemWithInteger:+ (nonnull instancetype) itemWithInteger:(NSInteger)value; ParametersReturn ValueAn instance of WZDataItem DiscussionCreates a new WZDataItem of type WZDataTypeInteger itemWithString:+ (nonnull instancetype) itemWithString:(nonnull NSString *)value; ParametersReturn ValueAn instance of WZDataItem DiscussionCreates a new WZDataItem of type WZDataTypeString listValue- (nullable WZDataList *)listValue; Return Valuethe list value of the WZDataItem, or nil if the item is not of type WZDataTypeList DiscussionGet the list value of the WZDataItem mapValue- (nullable WZDataMap *)mapValue; Return Valuethe map value of the WZDataItem, or nil if the item is not of type WZDataTypeMap DiscussionGet the map value of the WZDataItem stringValue- (nullable NSString *)stringValue; Return Valuethe string value of the WZDataItem, or nil if the item is not of type WZDataTypeString DiscussionGet the string value of the WZDataItem Propertiestype@property (nonatomic, assign, readonly) WZDataType type; DiscussionThe type of this data item. |