WOWZDataItem

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

Introduction

The WOWZDataItem class provides an interface for data items that represent server metadata that's 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 Boolean value of the WOWZDataItem, or 0 if the item isn't of the type WOWZDataTypeBoolean.

Discussion

Gets the Boolean value of the WOWZDataItem.


dateValue


- (nullable NSDate *)dateValue; 
Return Value

The date value of the WOWZDataItem, or nil if the item isn't of the type WOWZDataTypeDate.

Discussion

Gets the date value of the WOWZDataItem.


doubleValue


- (double) doubleValue; 
Return Value

The double value of the WOWZDataItem, or 0 if the item isn't of the type WOWZDataTypeDouble.

Discussion

Gets the double value of the WOWZDataItem.


floatValue


- (float) floatValue; 
Return Value

The float value of the WOWZDataItem, or 0 if the item isn't of the type WOWZDataTypeFloat.

Discussion

Gets the float value of the WOWZDataItem.


init


- (nonnull instancetype) init; 
Return Value

An instance of WOWZDataItem of the type WOWZDataTypeNull.

Discussion

Initializes a WOWZDataItem.


integerValue


- (NSInteger) integerValue; 
Return Value

The integer value of the WOWZDataItem, or 0 if the item isn't of the type WOWZDataTypeInteger.

Discussion

Gets the integer value of the WOWZDataItem.


itemWithBool:


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

The Boolean value to use to initialize the item.

Return Value

An instance of WOWZDataItem.

Discussion

Creates a WOWZDataItem whose type is WOWZDataTypeBool.


itemWithDate:


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

The date value to use to initialize the item.

Return Value

An instance of WOWZDataItem.

Discussion

Creates a WOWZDataItem whose type is WOWZDataTypeDate.


itemWithDouble:


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

The double value to use to initialize the item.

Return Value

An instance of WOWZDataItem.

Discussion

Creates a WOWZDataItem whose type is WOWZDataTypeDouble.


itemWithFloat:


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

The float value to use to initialize the item.

Return Value

An instance of WOWZDataItem.

Discussion

Creates a WOWZDataItem whose type is WOWZDataTypeFloat.


itemWithInteger:


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

The integer value to use to initialize the item.

Return Value

An instance of WOWZDataItem.

Discussion

Creates a WOWZDataItem whose type is WOWZDataTypeInteger.


itemWithString:


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

The string value to use to initialize the item.

Return Value

An instance of WOWZDataItem.

Discussion

Creates a WOWZDataItem whose type is WOWZDataTypeString.


listValue


- (nullable WOWZDataList *)listValue; 
Return Value

The list value of the WOWZDataItem, or nil if the item isn't of the type WOWZDataTypeList.

Discussion

Gets the list value of the WOWZDataItem.


mapValue


- (nullable WOWZDataMap *)mapValue; 
Return Value

The map value of the WOWZDataItem, or nil if the item isn't of the type WOWZDataTypeMap.

Discussion

Gets the map value of the WOWZDataItem.


stringValue


- (nullable NSString *)stringValue; 
Return Value

The string value of the WOWZDataItem, or nil if the item isn't of the type WOWZDataTypeString.

Discussion

Gets the string value of the WOWZDataItem.


Properties

type

type


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

The data item's type.